1 *java.lang.ref.WeakReference* *WeakReference* Weak reference objects, which do n
3 public class WeakReference
4 extends |java.lang.ref.Reference|
6 |java.lang.ref.WeakReference_Description|
7 |java.lang.ref.WeakReference_Fields|
8 |java.lang.ref.WeakReference_Constructors|
9 |java.lang.ref.WeakReference_Methods|
11 ================================================================================
13 *java.lang.ref.WeakReference_Constructors*
14 |java.lang.ref.WeakReference(T)|Creates a new weak reference that refers to the
15 |java.lang.ref.WeakReference(T,ReferenceQueue)|Creates a new weak reference tha
17 *java.lang.ref.WeakReference_Description*
19 Weak reference objects, which do not prevent their referents from being made
20 finalizable, finalized, and then reclaimed. Weak references are most often used
21 to implement canonicalizing mappings.
23 Suppose that the garbage collector determines at a certain point in time that
24 an object is weakly reachable. At that time it will atomically clear all weak
25 references to that object and all weak references to any other weakly-reachable
26 objects from which that object is reachable through a chain of strong and soft
27 references. At the same time it will declare all of the formerly
28 weakly-reachable objects to be finalizable. At the same time or at some later
29 time it will enqueue those newly-cleared weak references that are registered
30 with reference queues.
33 *java.lang.ref.WeakReference(T)*
35 public WeakReference(java.lang.Object referent)
37 Creates a new weak reference that refers to the given object. The new reference
38 is not registered with any queue.
40 referent - object the new weak reference will refer to
42 *java.lang.ref.WeakReference(T,ReferenceQueue)*
45 java.lang.Object referent,
46 java.lang.ref.ReferenceQueue q)
48 Creates a new weak reference that refers to the given object and is registered
51 referent - object the new weak reference will refer to
52 q - the queue with which the reference is to be registered, or null if registration