Re: JavaMemoryModel: Finalization idioms

From: Bob Lee (
Date: Sun May 01 2005 - 12:00:24 EDT

What if the object created a static weak reference to itself in the
constructor, and then nulled the weak reference in the finalizer? This
would remove the need to do something in every method of the object,
but the performance penalty would probably be higher (i.e. if you
stored the weak references in a set or something).


On 5/1/05, David Holmes <> wrote:
> My understanding of this issue is that the client code - that which is
> referencing the object - must do something to ensure the object remains
> reachable, but following some protocol involving the finalize method of the
> object concerned.

JavaMemoryModel mailing list -

This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:01:10 EDT