This is the mail archive of the
java-patches@sourceware.cygnus.com
mailing list for the Java project.
Re: Patch: finalize interned strings
- To: Bryce McKinlay <bryce at albatross dot co dot nz>
- Subject: Re: Patch: finalize interned strings
- From: Jeff Sturm <jsturm at sigma6 dot com>
- Date: Wed, 12 Apr 2000 18:03:55 -0400
- CC: tromey at cygnus dot com, Java Patch List <java-patches at sourceware dot cygnus dot com>
- Organization: AppNet
- References: <871z4bhwub.fsf@cygnus.com> <38F4E43A.63BA6163@albatross.co.nz>
Bryce McKinlay wrote:
> I'm now wondering: Does the collector guarentee that finalizers will be run
> immediatly when an object is collected? Or can the running of finializers be
> deferred until a later collection in some cases?
Finalizers should run *before* an object is collected. The finalizer
gets one chance to create a new reference to the object, preventing the
object from being collected at the time (though it may be collected
later, and a finalizer never runs twice per object).
--
Jeff Sturm
jsturm@sigma6.com