- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for awaitClear (0.07 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) -
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) -
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) -
guava-tests/test/com/google/common/base/AbstractIteratorTest.java
@Override public Object computeNext() { return new Object(); } }; WeakReference<Object> ref = new WeakReference<>(itr.next()); GcFinalization.awaitClear(ref); } public void testReentrantHasNext() { Iterator<Integer> iter = new AbstractIterator<Integer>() { @Override protected Integer computeNext() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Sep 17 18:14:12 UTC 2024 - 5.7K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/AbstractIteratorTest.java
@Override public Object computeNext() { return new Object(); } }; WeakReference<Object> ref = new WeakReference<>(itr.next()); GcFinalization.awaitClear(ref); } public void testDefaultBehaviorOfPeekForEmptyIteration() { AbstractIterator<Integer> empty = new AbstractIterator<Integer>() { private boolean alreadyCalledEndOfData;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Oct 15 17:36:06 UTC 2024 - 8.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/AbstractIteratorTest.java
@Override public Object computeNext() { return new Object(); } }; WeakReference<Object> ref = new WeakReference<>(itr.next()); GcFinalization.awaitClear(ref); } public void testDefaultBehaviorOfPeekForEmptyIteration() { AbstractIterator<Integer> empty = new AbstractIterator<Integer>() { private boolean alreadyCalledEndOfData;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Oct 15 17:36:06 UTC 2024 - 8.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/FuturesGetCheckedTest.java
public void testGetChecked_classUnloading() throws Exception { WeakReference<?> classUsedByGetChecked = doTestClassUnloading(); GcFinalization.awaitClear(classUsedByGetChecked); } /** * Loads {@link WillBeUnloadedException} in a separate {@code ClassLoader}, calls {@code
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 16.3K bytes - Viewed (0)