Re: JavaMemoryModel: A problematical case for finalizers

From: Joshua Bloch (
Date: Wed Apr 09 2003 - 14:21:59 EDT

Dave et al.,

>One thing I take from this discussion is that if "Foo" has a
>"finalize" method, then it is never the case that an instance of "Foo"
>is accessible only from its allocating thread. Compiler implementations
>that do static analyses to determine thread-locality of allocated
>objects would have to take this into account. Classes with finalizers
>should be rare enough to prevent this from taking away the benefit of
>such analyses, I'd think.
In fact, I think this is a good thing. It provides one more reason not
to use finalizers.


JavaMemoryModel mailing list -

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