java.lang.ref
public class WeakReference<T> extends Reference<T>
WeakHashtable
is a complete implementation of such a
table. See Also: WeakHashMap
Constructor Summary | |
---|---|
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. |
Parameters: referent the object we refer to.
Parameters: referent the object we refer to. q the reference queue to register on.
Throws: NullPointerException if q is null.