/libcore/ojluni/src/main/java/java/lang/ref/ |
WeakReference.java | 54 * @param referent object the new weak reference will refer to 56 public WeakReference(T referent) { 57 super(referent); 64 * @param referent object the new weak reference will refer to 68 public WeakReference(T referent, ReferenceQueue<? super T> q) { 69 super(referent, q);
|
Reference.java | 45 * If GC is not in progress (ie: not going through slow path), the referent 53 * Used by the reference processor to determine whether or not the referent 54 * can be immediately returned. Because the referent might get swept during 59 volatile T referent; /* Treated specially by GC */ field in class:Reference 87 /* -- Referent accessor and setters -- */ 90 * Returns this reference object's referent. If this reference object has 115 // Direct access to the referent is prohibited, clearReferent blocks and set 116 // the referent to null when it is safe to do so. 157 Reference(T referent) { 158 this(referent, null) [all...] |
PhantomReference.java | 36 * referent of a phantom reference is <a 40 * <p> In order to ensure that a reclaimable object remains so, the referent of 56 * Returns this reference object's referent. Because the referent of a 75 * @param referent the object the new phantom reference will refer to 79 public PhantomReference(T referent, ReferenceQueue<? super T> q) { 80 super(referent, q);
|
SoftReference.java | 86 * @param referent object the new soft reference will refer to 88 public SoftReference(T referent) { 89 super(referent); 97 * @param referent object the new soft reference will refer to 102 public SoftReference(T referent, ReferenceQueue<? super T> q) { 103 super(referent, q); 108 * Returns this reference object's referent. If this reference object has
|
/external/guava/guava/src/com/google/common/base/ |
FinalizablePhantomReference.java | 24 * after the garbage collector reclaims the referent. This is a simpler alternative to using a 37 * @param referent to phantom reference 38 * @param queue that should finalize the referent 40 protected FinalizablePhantomReference(T referent, FinalizableReferenceQueue queue) { 41 super(referent, queue.queue);
|
FinalizableSoftReference.java | 24 * the garbage collector reclaims the referent. This is a simpler alternative to using a {@link 35 * @param referent to softly reference 36 * @param queue that should finalize the referent 38 protected FinalizableSoftReference(T referent, FinalizableReferenceQueue queue) { 39 super(referent, queue.queue);
|
FinalizableWeakReference.java | 24 * the garbage collector reclaims the referent. This is a simpler alternative to using a {@link 35 * @param referent to weakly reference 36 * @param queue that should finalize the referent 38 protected FinalizableWeakReference(T referent, FinalizableReferenceQueue queue) { 39 super(referent, queue.queue);
|
/packages/apps/TV/common/src/com/android/tv/common/ |
WeakHandler.java | 40 * Constructs a new handler with a weak reference to the given referent using the provided 44 * @param ref the referent to track 52 * Constructs a new handler with a weak reference to the given referent. 54 * @param ref the referent to track 65 T referent = mRef.get(); local 66 if (referent == null) { 69 handleMessage(msg, referent); 78 * @param referent the referent. Guaranteed to be non null. 80 protected abstract void handleMessage(Message msg, @NonNull T referent); [all...] |
/libcore/luni/src/main/java/libcore/util/ |
NativeAllocationRegistry.java | 91 * argument when <code>referent</code> becomes unreachable. If you 93 * <code>referent</code>, you must not access these after 94 * <code>referent</code> becomes unreachable, because they may be dangling 98 * <code>referent</code> becomes unreachable. The runnable will have no 102 * @param referent java object to associate the native allocation with 105 * @throws IllegalArgumentException if either referent or nativePtr is null. 113 public Runnable registerNativeAllocation(Object referent, long nativePtr) { 114 if (referent == null) { 115 throw new IllegalArgumentException("referent is null"); 128 Cleaner cleaner = Cleaner.create(referent, new CleanerThunk(nativePtr)) [all...] |
/art/tools/ahat/test/ |
NativeAllocationTest.java | 33 AhatInstance referent = dump.getDumpedAhatInstance("anObject"); local 34 assertEquals(50000, referent.getSize().getRegisteredNativeSize());
|
/art/runtime/mirror/ |
reference-inl.h | 35 inline void Reference::SetReferent(ObjPtr<Object> referent) { 36 SetFieldObjectVolatile<kTransactionActive>(ReferentOffset(), referent); local
|
/art/runtime/native/ |
java_lang_ref_FinalizerReference.cc | 40 ObjPtr<mirror::Object> const referent = local 42 return soa.AddLocalReference<jobject>(referent);
|
java_lang_ref_Reference.cc | 34 ObjPtr<mirror::Object> const referent = local 36 return soa.AddLocalReference<jobject>(referent);
|
/art/runtime/gc/ |
reference_processor.cc | 70 ObjPtr<mirror::Object> const referent = reference->GetReferent(); local 71 // If the referent is null then it is already cleared, we can just return null since there is no 73 if (UNLIKELY(!SlowPathEnabled()) || referent == nullptr) { 74 return referent; 80 ObjPtr<mirror::Object> referent = reference->GetReferent<kWithoutReadBarrier>(); local 81 // If the referent became cleared, return it. Don't need barrier since thread roots can't get 83 if (referent == nullptr) { 86 // Try to see if the referent is already marked by using the is_marked_callback. We can return 89 // If it's null it means not marked, but it could become marked if the referent is reachable 95 // Use the cached referent instead of calling GetReferent since other threads could cal 215 mirror::HeapReference<mirror::Object>* referent = ref->GetReferentReferenceAddr(); local [all...] |
reference_queue.cc | 92 ObjPtr<mirror::Object> referent = ref->GetReferent<kWithoutReadBarrier>(); local 93 // The referent could be null if it's cleared by a mutator (Reference.clear()). 94 if (referent != nullptr) { 95 CHECK(concurrent_copying->IsInToSpace(referent.Ptr())) 97 << " referent=" << referent; 140 // Referent is white, clear it. 163 // Move the updated referent to the zombie field. 188 // do_atomic_update is false because mutators can't access the referent due to the weak ref
|
/libcore/luni/src/test/java/libcore/util/ |
NativeAllocationRegistryTest.java | 124 Object referent = new Object(); local 125 Runnable cleaner = registry.registerNativeAllocation(referent, nativePtr); 137 // There shouldn't be any problems when the referent object is GC'd. 138 referent = null; 146 final Object referent = new Object(); local 148 // referent should not be null 158 registry.registerNativeAllocation(referent, 0); 162 // referent should not be null 177 assertNull(registry.registerNativeAllocation(referent,
|
/art/tools/ahat/src/heapdump/ |
Perflib.java | 42 Object referent = getField(cleaner, "referent"); local 43 if (referent instanceof Instance) { 44 Instance inst = (Instance)referent;
|
/libcore/ojluni/src/main/java/sun/misc/ |
Cleaner.java | 44 * <p> A cleaner tracks a referent object and encapsulates a thunk of arbitrary 45 * cleanup code. Some time after the GC detects that a cleaner's referent has 114 private Cleaner(Object referent, Runnable thunk) { 115 super(referent, dummyQueue); 122 * @param ob the referent object to be cleaned
|
/art/tools/ahat/src/ |
Summarizer.java | 86 // Annotate Reference with its referent 87 AhatInstance referent = inst.getReferent(); local 88 if (referent != null) { 91 // It should not be possible for a referent to refer back to the 94 formatted.append(summarize(referent));
|
/external/smali/dexlib2/src/test/java/org/jf/dexlib2/builder/ |
PayloadAlignmentTest.java | 110 Instruction31t referent = (Instruction31t)instructions.get(0); local 111 Assert.assertEquals(6, referent.getCodeOffset()); 138 Instruction31t referent = (Instruction31t)instructions.get(0); local 139 Assert.assertEquals(8, referent.getCodeOffset()); 197 OffsetInstruction referent = (OffsetInstruction)instructions.get(7); local 198 Assert.assertEquals(-14, referent.getCodeOffset()); 248 OffsetInstruction referent = (OffsetInstruction)instructions.get(7); local 249 Assert.assertEquals(-18, referent.getCodeOffset());
|
/packages/apps/TV/src/com/android/tv/util/ |
ImageLoader.java | 103 * Creates an callback keeping a weak reference to {@code referent}. 105 * <p> If the "referent" is no longer valid, it no longer makes sense to run the 106 * callback. The referent is the View, or Activity or whatever that actually needs to 107 * receive the Bitmap. If the referent has been GC, then no need to run the callback. 109 public ImageLoaderCallback(T referent) { 110 mWeakReference = new WeakReference<>(referent); 117 T referent = mWeakReference.get(); local 118 if (referent != null) { 119 onBitmapLoaded(referent, bitmap); 128 public abstract void onBitmapLoaded(T referent, @Nullable Bitmap bitmap) [all...] |
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ref/ |
PhantomReferenceTest.java | 25 //TODO: write a test to verify that the referent's finalize() happens 71 public TestPhantomReference(T referent, 73 super(referent, q);
|
ReferenceTest.java | 43 public TestWeakReference(T referent, ReferenceQueue<? super T> q) { 44 super(referent, q); 74 assertNull("Referent is not null.", pr.get()); 80 assertNull("Referent is not null.", pr.get()); 257 * Checks to make sure that the referent of the WeakReference 267 public TestObject(String referent) { 268 stringRef = new WeakReference<String>(referent); 273 /* If a VM bug has caused the referent to get
|
/libcore/luni/src/main/java/java/lang/ref/ |
FinalizerReference.java | 39 // When the GC wants something finalized, it moves it from the 'referent' field to 55 public static void add(Object referent) { 56 FinalizerReference<?> reference = new FinalizerReference<Object>(referent, queue); 105 // Use getReferent() instead of directly accessing the referent field not to race
|
/external/desugar/java/com/google/devtools/build/android/desugar/runtime/ |
ThrowableExtension.java | 304 * key. If the referent is marked for garbage collection and is set to null, we are still able 309 public WeakKey(Throwable referent, ReferenceQueue<Throwable> q) { 310 super(referent, q); 311 if (referent == null) { 312 throw new NullPointerException("The referent cannot be null"); 314 hash = System.identityHashCode(referent); 331 // Note that, after the referent is garbage collected, then the referent will be null.
|