Java Programing laungage

java.lang Projects

java.lang Project

java.lang Examples

java.lang Examples

Package java.lang.ref

This package provides flexible types of reference-object classes, which support a limited degree of interaction with application and the garbage collector or Java virtual machine (JVM).

Previous Home Next
adplus-dvertising

Java.lang.ref Package

ClassDescription
PhantomReference<T> Phantom reference objects, which are enqueued after the collector determines that their referents may otherwise be reclaimed. Phantom references are most often used for scheduling pre-mortem cleanup actions in a more flexible way than is possible with the Java finalization mechanism.
Reference<T>Abstract base class for reference objects. This class defines the operations common to all reference objects. Because reference objects are implemented in close cooperation with the garbage collector, this class may not be subclassed directly.
ReferenceQueue<T>Reference queues, to which registered reference objects are appended by the garbage collector after the appropriate reachability changes are detected.
SoftReference<T>Soft reference objects, which are cleared at the discretion of the garbage collector in response to memory demand. Soft references are most often used to implement memory-sensitive caches.
WeakReference<T> Weak reference objects, which do not prevent their referents from being made finalizable, finalized, and then reclaimed. Weak references are most often used to implement canonicalizing mappings.
Previous Home Next