Uses of Class
java.lang.ref.Reference
Packages that use Reference
Package
Description
Provides reference-object classes, which support a limited degree
of interaction with the garbage collector.
-
Uses of Reference in java.lang.ref
Subclasses of Reference in java.lang.refModifier and TypeClassDescriptionclass
PhantomReference objects are used to detect referents which are no longer visible and are eligible to have their storage reclaimed.class
SoftReference objects are used to detect referents which are no longer visible and who's memory is to be reclaimed.class
WeakReference objects are used to detect referents which are no longer visible.Methods in java.lang.ref that return ReferenceModifier and TypeMethodDescriptionReferenceQueue.poll()
Returns the next available reference from the queue if one is enqueued, null otherwise.ReferenceQueue.remove()
Return the next available enqueued reference on the queue, blocking indefinitely until one is available.ReferenceQueue.remove
(long timeout) Return the next available enqueued reference on the queue, blocking up to the time given until one is available.