java.lang.Object
java.lang.ref.Reference<T>
java.lang.ref.WeakReference<T>
WeakReference objects are used to detect referents which
are no longer visible.
- Since:
- 1.2
-
Constructor Summary
ConstructorsConstructorDescriptionWeakReference
(T r) Constructs a new instance of this class.WeakReference
(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, get, isEnqueued, reachabilityFence, refersTo
-
Constructor Details
-
WeakReference
Constructs a new instance of this class.- Parameters:
r
- referent to track.q
- queue to register to the reference object with.
-
WeakReference
Constructs a new instance of this class.- Parameters:
r
- referent to track.
-