FileDocCategorySizeDatePackage
PhantomReference.javaAPI DocAndroid 1.5 API3134Wed May 06 22:41:04 BST 2009java.lang.ref

PhantomReference

public class PhantomReference extends Reference
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)

');
Fields Summary
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}.

param
r the referent to track
param
q the queue to register the phantom reference object with
since
Android 1.0

        super();
        referent = r;
        queue = q;
    
Methods Summary
public Tget()
Returns {@code null}. The referent of a phantom reference is not accessible.

return
{@code null} (always)
since
Android 1.0

        return null;