Java Reference
In-Depth Information
Figure 7-9. Indefinite references are not cleared immediately
The indefinite reference object itself now has (at least) two strong references to it: the origin-
al strong reference(s) created by the application, and a new strong reference (created by the
JVM) on a reference queue. All of these strong references must be cleared before the indefin-
ite reference object itself can be reclaimed by the garbage collector.
Typically this cleanup is done by whatever code is processing the reference queue. That code
will get notified that there is a new object on the queue and immediately remove all strong
Search WWH ::




Custom Search