RE: JavaMemoryModel: Finalization idioms

From: David Holmes (
Date: Sat Apr 30 2005 - 23:27:09 EDT

Bob Lee writes:
> My point is that the empty synchronization blocks won't prevent the
> finalizer from running before the other methods have completed, nor
> will the volatile field accesses in #2. Am I missing something?

You are missing something. The empty sync block forces the object to be
reachable and so the finalizer can not run prior to the sync block
completing execution.

David Holmes

JavaMemoryModel mailing list -

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