java.lang.Object
java.lang.ref.Reference<T>
java.lang.ref.SoftReference<T>
SoftReference objects are used to detect referents which
are no longer visible and who's memory is to be reclaimed.
- Since:
- 1.2
-
Constructor Summary
ConstructorsConstructorDescriptionSoftReference
(T r) Constructs a new instance of this class.SoftReference
(T r, ReferenceQueue<? super T> q) Constructs a new instance of this class. -
Method Summary
Methods declared in class java.lang.ref.Reference
clear, clone, enqueue, isEnqueued, reachabilityFence, refersTo
-
Constructor Details
-
SoftReference
Constructs a new instance of this class.- Parameters:
r
- referent to track.q
- queue to register to the reference object with.
-
SoftReference
Constructs a new instance of this class.- Parameters:
r
- referent to track.
-
-
Method Details