public class PhantomReference<T> extends Reference<T>
get()
always
returns null.Constructor and Description |
---|
PhantomReference(T referent,
ReferenceQueue<? super T> q)
Creates a new phantom reference.
|
public PhantomReference(T referent, ReferenceQueue<? super T> q)
referent
- the object that should be watched.q
- the queue that should be notified, if the referent was
finalized. This mustn't be null
.NullPointerException
- if q is null.