Re: JavaMemoryModel: Another Java threading issue (finalization)

From: 914 (alpern@watson.ibm.com)
Date: Wed Apr 02 2003 - 08:21:40 EST


As I understand it, the (a) problem is that an object can legally be
finalized while a method invoked on the object is still running. This
because the running method might not reference the object itself (although
it might still reference its fields). Is this correct?

Would it help to say that an objects is reachable as long as any of its
field may be referenced?

Synchronization of the method and the finalizer would probably still be
necessary to prevent a race.

     Bowen
-------------------------------
JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel



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