comp.lang.ada
 help / color / mirror / Atom feed
From: bobduff@world.std.com (Robert A Duff)
Subject: Re: Chunks of finalized
Date: 1997/10/03
Date: 1997-10-03T00:00:00+00:00	[thread overview]
Message-ID: <EHHpLx.Kz6@world.std.com> (raw)
In-Reply-To: 6129sn$n91$1@goanna.cs.rmit.edu.au


In article <6129sn$n91$1@goanna.cs.rmit.edu.au>,
Richard A. O'Keefe <ok@goanna.cs.rmit.edu.au> wrote:
>Let's consider a stack, that might grow very large, or might be quite
>small.  This is not an actual application, it's just the context for
>what I want to understand.

By the way, wouldn't a simpler stack implementation illustrate your
question just as well?  A record containing an array of elements, and an
index of the top of the stack.  The issue is that you want to finalize
an element when the Top pointer is decremented, right?

You can call Finalize explicitly, if you like.  And Finalize operations
should normally be implemented in such a way that they work properly
when you finalize things twice.

However, there's no way to explicitly say "finalize this thing,
including all its subcomponents".  This happens when you leave a
procedure, or when you Unchecked_Deallocate, but you can't do it
explicitly.  If you made it an array of access-to-whatever, then you
could Unchecked_Deallocate each component when necessary.  But
unfortunately I don't see any way to invoke finalization (including
subcomponents) other than that.

Does that answer your question?

- Bob




  reply	other threads:[~1997-10-03  0:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-10-03  0:00 Chunks of finalized Richard A. O'Keefe
1997-10-03  0:00 ` Robert A Duff [this message]
1997-10-03  0:00 ` Stephen Leake
1997-10-04  0:00   ` Robert A Duff
1997-10-06  0:00     ` Tucker Taft
1997-10-07  0:00       ` Richard A. O'Keefe
1997-10-05  0:00 ` Matthew Heaney
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox