Build 1.0_r1(from source)

java.lang.ref
Class WeakReference<T>

java.lang.Object
  extended by java.lang.ref.Reference<T>
      extended by java.lang.ref.WeakReference<T>
Direct Known Subclasses:
BasicPoolEntryRef, ProcessManager.ProcessReference

public class WeakReference<T>
extends Reference<T>

Implements a weak reference, which is the middle of the three types of references. Once the garbage collector decides that an object obj is is

Field Summary
 
Fields inherited from class java.lang.ref.Reference
queue, queueNext, referent
 
Constructor Summary
WeakReference(T r)
          Constructs a new weak reference to the given referent.
WeakReference(T r, ReferenceQueue<? super T> q)
          Constructs a new weak reference to the given referent.
 
Method Summary
 
Methods inherited from class java.lang.ref.Reference
clear, enqueue, get, isEnqueued
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WeakReference

public WeakReference(T r)
Constructs a new weak reference to the given referent. The newly created reference is not registered with any reference queue.

Parameters:
r - the referent to track
Since:
Android 1.0

WeakReference

public WeakReference(T r,
                     ReferenceQueue<? super T> q)
Constructs a new weak reference to the given referent. The newly created reference is registered with the given reference queue.

Parameters:
r - the referent to track
q - the queue to register to the reference object with. A null value results in a weak reference that is not associated with any queue.
Since:
Android 1.0

Build 1.0_r1(from source)

Please submit a feedback, bug or feature