- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 17 for awaitClear (0.13 sec)
-
android/guava-testlib/src/com/google/common/testing/GcFinalization.java
* WeakReference<Foo> weakRef = new WeakReference<>(x); * // ... use x ... * x = null; // Hint to the JIT that x is stack-unreachable * return weakRef; * } * public void testFooLeak() { * GcFinalization.awaitClear(fooWeakRef()); * } * }</pre> * * <p>This class cannot currently be used to test soft references, since this class does not try to * create the memory pressure required to cause soft references to be cleared. *
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 11.6K bytes - Viewed (0) -
android/guava-testlib/test/com/google/common/testing/GcFinalizationTest.java
assertTrue(future.isDone()); assertTrue(future.isCancelled()); } public void testAwaitClear() { final WeakReference<Object> ref = new WeakReference<>(new Object()); GcFinalization.awaitClear(ref); assertNull(ref.get()); } public void testAwaitDone_finalizationPredicate() { final WeakHashMap<Object, Object> map = new WeakHashMap<>(); map.put(new Object(), Boolean.TRUE);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 02:42:09 UTC 2024 - 7.9K bytes - Viewed (0) -
guava-testlib/test/com/google/common/testing/GcFinalizationTest.java
assertTrue(future.isDone()); assertTrue(future.isCancelled()); } public void testAwaitClear() { final WeakReference<Object> ref = new WeakReference<>(new Object()); GcFinalization.awaitClear(ref); assertNull(ref.get()); } public void testAwaitDone_finalizationPredicate() { final WeakHashMap<Object, Object> map = new WeakHashMap<>(); map.put(new Object(), Boolean.TRUE);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 02:42:09 UTC 2024 - 7.9K bytes - Viewed (0) -
guava-testlib/src/com/google/common/testing/GcFinalization.java
* WeakReference<Foo> weakRef = new WeakReference<>(x); * // ... use x ... * x = null; // Hint to the JIT that x is stack-unreachable * return weakRef; * } * public void testFooLeak() { * GcFinalization.awaitClear(fooWeakRef()); * } * }</pre> * * <p>This class cannot currently be used to test soft references, since this class does not try to * create the memory pressure required to cause soft references to be cleared. *
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 11.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/StripedTest.java
public void testWeakImplementations() { for (Striped<?> striped : weakImplementations()) { WeakReference<Object> weakRef = new WeakReference<>(striped.get(new Object())); GcFinalization.awaitClear(weakRef); } } @AndroidIncompatible // Presumably GC doesn't trigger, despite our efforts. public void testWeakReadWrite() { Striped<ReadWriteLock> striped = Striped.lazyWeakReadWriteLock(1000);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Jun 26 12:58:35 UTC 2024 - 8.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/StripedTest.java
public void testWeakImplementations() { for (Striped<?> striped : weakImplementations()) { WeakReference<Object> weakRef = new WeakReference<>(striped.get(new Object())); GcFinalization.awaitClear(weakRef); } } @AndroidIncompatible // Presumably GC doesn't trigger, despite our efforts. public void testWeakReadWrite() { Striped<ReadWriteLock> striped = Striped.lazyWeakReadWriteLock(1000);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Jun 26 12:58:35 UTC 2024 - 8.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/base/FinalizableReferenceQueueClassLoaderUnloadingTest.java
assertNotNull(sepStopwatchA.get()); // Clear all references to the Stopwatch and wait for it to be gc'd. sepStopwatchA.set(null); GcFinalization.awaitClear(sepStopwatchRef.get()); // Return a weak reference to the parallel ClassLoader. This is the reference that should // eventually become clear if there are no other references to the ClassLoader.
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 13.3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/InternersTest.java
assertSame(canonical, pool.intern(canonical)); WeakReference<Integer> signal = new WeakReference<>(canonical); canonical = null; // Hint to the JIT that canonical is unreachable GcFinalization.awaitClear(signal); assertSame(not, pool.intern(not)); } public void testAsFunction_simplistic() { String canonical = "a"; String not = new String("a"); Function<String, String> internerFunction =
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Jul 24 22:09:38 UTC 2024 - 4K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/InternersTest.java
assertSame(canonical, pool.intern(canonical)); WeakReference<Integer> signal = new WeakReference<>(canonical); canonical = null; // Hint to the JIT that canonical is unreachable GcFinalization.awaitClear(signal); assertSame(not, pool.intern(not)); } public void testAsFunction_simplistic() { String canonical = "a"; String not = new String("a"); Function<String, String> internerFunction =
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Jul 24 22:09:38 UTC 2024 - 4K bytes - Viewed (0) -
guava-tests/test/com/google/common/base/FinalizableReferenceQueueTest.java
*/ private WeakReference<ReferenceQueue<Object>> queueReference; public void testThatFinalizerStops() { weaklyReferenceQueue(); GcFinalization.awaitClear(queueReference); } /** If we don't keep a strong reference to the reference object, it won't be enqueued. */ @Nullable FinalizableWeakReference<Object> reference;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 21 14:28:19 UTC 2024 - 4.8K bytes - Viewed (0)