From: "Matthew Heaney" <matthew_heaney@acm.org>
Subject: Re: Deallocating an object referenced via a classwide access type.
Date: 2000/01/11
Date: 2000-01-11T00:00:00+00:00 [thread overview]
Message-ID: <387b764d_2@news1.prserv.net> (raw)
In-Reply-To: 387aa062_4@news1.prserv.net
In article <387aa062_4@news1.prserv.net> , "Matthew Heaney"
<matthew_heaney@acm.org> wrote:
> The basic idea is to declare a private operation (similar to what you
> have in your example) that does the actual deallocation of the specific
> type, and to call this operation by dispatching on the tag of the object
> whose type is class-wide. Like this:
>
> package P is
>
> type T (<>) is abstract tagged limited null record; --0
>
> type TA is access all T'Class;
> for TA'Storage_Size use 0; -- avoid RTS baggage
>
> <primitive ops for types in T'Class>
Oops! I forgot to mention that primitive ops for T take access
parameters. Like this:
procedure Op (O : access T);
This is so, in order to avoid having to explicitly dereference the
access object returned by constructors.
--
Get the FAQs about evolution and creationism.
<http://www.talkorigins.org/origins/faqs.html>
next prev parent reply other threads:[~2000-01-11 0:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-01-11 0:00 Deallocating an object referenced via a classwide access type Aidan Skinner
2000-01-10 0:00 ` Matthew Heaney
2000-01-11 0:00 ` Matthew Heaney [this message]
2000-01-11 0:00 ` Tucker Taft
2000-01-11 0:00 ` Laurent Guerby
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox