[gclist] Finalization and death notices

Greg Colvin gcolvin@us.oracle.com
Tue, 9 Oct 2001 12:09:25 -0600


From: Boehm, Hans <hans_boehm@hp.com>
> I think that some of what we're really talking about here is the choice
> between three alternatives:
> 
> 1) The collector directly runs finalizers from whichever thread happened to
> allocate and invoke the collector.  This is common in early Java
> implementations, but fundamentally broken.  It leads to intermittent
> deadlocks and/or multiple threads in the same monitor.  Let's ignore this
> alternative.  (Such a facility can sometimes be used to implement a
> reasonable one.  But if it's there it shouldn't be exposed to the user.)

Is this approach broken if it is done immediately after the last
pointer to an object goes away, as with reference counting?