Re: JavaMemoryModel: Finalizer question

From: Bart Jacobs (
Date: Wed Apr 21 2004 - 05:24:29 EDT

Personally, I like the idea of a GC.KeepAlive method, as in the .NET

The rule would be: the finalizer for object O happens-after every
GC.KeepAlive call for object O. (Or, more specifically: after a point
where no GC.KeepAlive call could possibly follow if no finalizers were run.)

So, after each access of the "global data structure" (e.g. an operation
on the file), the programmer must insert a GC.KeepAlive call. This is
nice, simple and explicit, and the overhead is acceptable.

JavaMemoryModel mailing list -

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