Implements a phantom reference, which is the weakest of the three types of
references. Once the garbage collector decides that an object {@code obj} is
Omit source code) ');
Constructors Summary |
---|
public PhantomReference(T r, ReferenceQueue q)Constructs a new phantom reference and registers it with the given
reference queue. The reference queue may be {@code null}, but this case
does not make any sense, since the reference will never be enqueued, and
the {@link #get()} method always returns {@code null}.
super();
referent = r;
queue = q;
|
Methods Summary |
---|
public T | get()Returns {@code null}. The referent of a phantom reference is not
accessible.
return null;
|
|