English | Site Directory

Android - An Open Handset Alliance Project

java.lang.ref
public class

java.lang.ref.PhantomReference

java.lang.Object
java.lang.ref.Reference
java.lang.ref.PhantomReference

PhantomReference objects are used to detect referents which are no longer visible and are eligible to have their storage reclaimed.

Summary

Public Constructors

          PhantomReference(T r, ReferenceQueue q)
Constructs a new instance of this class.

Public Methods

        T  get()
Return the referent of the reference object.
Methods inherited from class java.lang.ref.Reference
Methods inherited from class java.lang.Object

Details

Public Constructors

public PhantomReference(T r, ReferenceQueue q)

Constructs a new instance of this class.

Parameters

r referent to track.
q queue to register to the reference object with.

Public Methods

public T get()

Return the referent of the reference object. Phantom reference objects referents are inaccessible, and so null is returned.

Returns

  • Object Returns null.
Build m5-rc15i - 10 Jun 2008 13:54