Uses of Class
java.lang.ref.Reference
Packages that useReference
Package
Description
Provides reference-object classes, which support a limited degreeof interaction with the garbage collector.
Uses ofReference injava.lang.ref
Subclasses ofReference injava.lang.refModifier and TypeClassDescriptionclassPhantom reference objects, which are enqueued after the collectordetermines that their referents may otherwise be reclaimed.classSoft reference objects, which are cleared at the discretion of the garbagecollector in response to memory demand.classWeak reference objects, which do not prevent their referents from beingmade finalizable, finalized, and then reclaimed.Methods injava.lang.ref that returnReferenceModifier and TypeMethodDescriptionReferenceQueue.poll()Polls this queue to see if a reference object is available.ReferenceQueue.remove()Removes the next reference object in this queue, blocking until onebecomes available.ReferenceQueue.remove(long timeout) Removes the next reference object in this queue, blocking until eitherone becomes available or the given timeout period expires.