public class WeakReference<T> extends Reference<T>
WeakHashtable
is a complete implementation of such a
table. WeakHashMap
Constructor and Description |
---|
WeakReference(T referent)
Create a new weak reference, that is not registered to any queue.
|
WeakReference(T referent,
ReferenceQueue<? super T> q)
Create a new weak reference.
|
public WeakReference(T referent)
referent
- the object we refer to.public WeakReference(T referent, ReferenceQueue<? super T> q)
referent
- the object we refer to.q
- the reference queue to register on.NullPointerException
- if q is null.