Patch: finalize interned strings
Jeff Sturm
jsturm@sigma6.com
Wed Apr 12 14:40:00 GMT 2000
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
More information about the Java-patches
mailing list