|
|
Btw, it seems that I am not the only one who realizes the problem of
delayed object destruction. In fact, a name has been coined for when
an object is destroyed immediately when it goes out of scope in a GC
environment: Deterministic finalization.
One example of someone else discussing this same subject, from the point
of view of .NET:
http://www.deez.info/sengelha/2005/02/11/deterministic-finalization-in-garbage-collected-languages/
Probably more examples can be found by googling "deterministic finalization".
--
- Warp
Post a reply to this message
|
|
|
|
Warp wrote:
> Btw, it seems that I am not the only one who realizes the problem of
> delayed object destruction.
Heh. I think most everyone realizes it. :-) People just aren't sure of
any good(*) way of solving it.
Indeed, I've seen research in Java where they look at the generated
code, determine that a pointer to an object *must* be the last pointer
(e.g., it hasn't been assigned to an instance variable, it hasn't been
passed to something separately compiled that might have stored it, etc)
and GC that object as soon as it goes out of scope. Apparently this
provides even *better* performance than GC alone. Basically moving (via
optimization rather than via asking the programmer) the object to the
stack instead of the heap.
(*) Where "good" encompasses "runs on popular OSes" and "works with
"normal" languages.
--
Darren New / San Diego, CA, USA (PST)
"That's pretty. Where's that?"
"It's the Age of Channelwood."
"We should go there on vacation some time."
Post a reply to this message
|
|