From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: Heap Memory Management Question(s)
Date: 05 Apr 2006 17:42:09 -0400
Date: 2006-04-05T17:42:09-04:00 [thread overview]
Message-ID: <wcclkuj7l8u.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: 4433A136.6080503@gmx.de
Florian Liekweg <liekweg@gmx.de> writes:
> Sorry for being unclear. I was thinking of, e.g., a package variable,
> which, as I understand, is not visible and/or accessible everywhere,
> but it exists and keeps its state over the lifetime of the program.
>
> My assumption is the following:
> We can momentarily leave the area where the variable is /visible/,
> but it stays in existence. The lifetime of the object it points to
> can now span the entire program, not just the time the variable is
> visible.
> My conclusion is: Visibility of the access type doesn't help when it
> comes to determining the lifetime of that object. NB, it could
> of course /improve/ whatever analysis a sophisticated compiler
> might do.
That's correct. Lifetime is different from visibility.
If you declare:
X: Integer;
in a library package, it lasts essentially "forever".
Likewise, if you declare an access type:
type A is access ...;
the heap-allocated objects in A's "collection" can last "forever"
(or you can use Unchecked_Deallocation to destroy them).
- Bob
next prev parent reply other threads:[~2006-04-05 21:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-04 9:57 Heap Memory Management Question(s) Florian Liekweg
2006-04-04 15:06 ` Robert A Duff
2006-04-05 10:51 ` Florian Liekweg
2006-04-05 16:50 ` jimmaureenrogers
2006-04-05 21:42 ` Robert A Duff [this message]
2006-04-06 0:17 ` Adam Beneschan
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox