June 2002
Intermediate to advanced
704 pages
15h 6m
English
When an object becomes subject to garbage collection, it is not necessarily garbage collected immediately. It might, in fact, never be garbage collected. The program might terminate before the garbage collector gets around to reclaiming the object. Being subject to garbage collection simply means that an object is eligible to be reclaimed.
The previous section displayed the results of running GarbageDemo on a computer. Note that only 12 objects had their finalize() method invoked by the garbage collector. What happened to Garbage(13) and Garbage(14)? Garbage(13) was subject to garbage collection, but the garbage collector never got around to invoking its finalize() method. Garbage(14) remained ...
Read now
Unlock full access