java.lang.ref
public
class
java.lang.ref.WeakReference<T>
Summary
Public Constructors
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
Details
Public Constructors
public
WeakReference(T r)
Constructs a new weak reference to the given referent. The newly created
reference is not registered with any reference queue.
public
WeakReference(T r, ReferenceQueue<? super T> q)
Constructs a new weak reference to the given referent. The newly created
reference is registered with the given reference queue.
Parameters
r
| the referent to track |
q
| the queue to register to the reference object with. A null value
results in a weak reference that is not associated with any
queue. |