From: "David S. Gibson" <dgibson@cis.ohio-state.edu>
Subject: Re: "Inefficiency" of controlled types
Date: 1997/06/30
Date: 1997-06-30T00:00:00+00:00 [thread overview]
Message-ID: <33B7B7AF.BC80B16@cis.ohio-state.edu> (raw)
In-Reply-To: mheaney-ya023680002906971508070001@news.ni.net
Matthew Heaney wrote:
>
> I'm curious about early in a derivation tree controlled types should be
> introduced, given that there is some overhead in their use.
. . .
> However, we really only need this for unbounded forms, which use heap
> allocation. For bounded forms (implemented as an array), finalization is
> not really required, and so there is an "unnecessary" amount of overhead.
>
> We don't have to introduce Controlled that early in the hierarchy. Clients
> that need it could declare a Controlled wrapper for that stack component
> that requires finalization (say, a list component used to implement the
> unbouned stack).
When I was using controlled types for the same purpose, I found that I
had to
derive generic components from Ada.Finialization.Limited_Controlled at
the
root level due to the accessibility rules of Ada. If I recall
correctly, an
instance of a generic controlled type package needs to be declared as a
library-level package. While I put the derivation from
Limited_Controlled in
the private part, I would have liked to move it down some in the
hierarchy.
Dave
--
dgibson@cis.ohio-state.edu
prev parent reply other threads:[~1997-06-30 0:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-06-29 0:00 "Inefficiency" of controlled types Matthew Heaney
1997-06-30 0:00 ` Simon Wright
1997-07-02 0:00 ` Tucker Taft
1997-06-30 0:00 ` David S. Gibson [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox