This is the mail archive of the java-patches@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Patch: finalize interned strings


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]