IBM User Guide for Java V7 on Windows > IBM SDK for Java > The collector and the allocator > How to coexist with the Garbage Collector > Finalizers



How finalizers are run

When the Garbage Collector (GC) decides to process unreachable finalized objects, those objects are placed onto a queue that is used as input to a separate finalizer thread.

When the GC has ended and the threads are unblocked, this finalizer thread starts. It runs as a high-priority thread and runs down the queue, running the finalizer of each object in turn. When the finalizer has run, the finalizer thread marks the object as collectable and the object is probably collected in the next garbage collection cycle. See list item 7d in Garbage collection summary. If you are running with a large heap, the next garbage collection cycle might not happen for some time.


Parent: Finalizers








Error 404 - Not Found

Error 404 - Not Found

The document you are looking for may have been removed or re-named. Please contact the web site owner for further assistance.