- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 18 for awaitClear (0.05 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
android/guava-tests/test/com/google/common/util/concurrent/ClosingFutureLeakTest.java
* See the License for the specific language governing permissions and * limitations under the License. */ package com.google.common.util.concurrent; import static com.google.common.testing.GcFinalization.awaitClear; import static com.google.common.truth.Truth.assertThat; import static com.google.common.util.concurrent.MoreExecutors.directExecutor; import com.google.common.annotations.GwtIncompatible;
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sat Mar 07 02:20:33 GMT 2026 - 1.8K bytes - Click Count (0) -
guava-tests/test/com/google/common/util/concurrent/ClosingFutureLeakTest.java
* See the License for the specific language governing permissions and * limitations under the License. */ package com.google.common.util.concurrent; import static com.google.common.testing.GcFinalization.awaitClear; import static com.google.common.truth.Truth.assertThat; import static com.google.common.util.concurrent.MoreExecutors.directExecutor; import com.google.common.annotations.GwtIncompatible;
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sat Mar 07 02:20:33 GMT 2026 - 1.8K bytes - Click Count (0) -
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()); * } * } * * <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. *
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Mar 12 20:19:19 GMT 2026 - 12.3K bytes - Click Count (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()); * } * } * * <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. *
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Mar 12 20:19:19 GMT 2026 - 12.3K bytes - Click Count (0) -
guava-testlib/test/com/google/common/testing/GcFinalizationTest.java
assertTrue(future.isDone()); assertTrue(future.isCancelled()); } public void testAwaitClear() { WeakReference<Object> ref = createWeakReference(); GcFinalization.awaitClear(ref); assertThat(ref.get()).isNull(); } private WeakReference<Object> createWeakReference() { return new WeakReference<>(new Object()); }
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Mar 17 16:11:48 GMT 2026 - 8.8K bytes - Click Count (0) -
android/guava-testlib/test/com/google/common/testing/GcFinalizationTest.java
assertTrue(future.isDone()); assertTrue(future.isCancelled()); } public void testAwaitClear() { WeakReference<Object> ref = createWeakReference(); GcFinalization.awaitClear(ref); assertThat(ref.get()).isNull(); } private WeakReference<Object> createWeakReference() { return new WeakReference<>(new Object()); }
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Mar 17 16:11:48 GMT 2026 - 8.8K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/base/FinalizableReferenceQueueClassLoaderUnloadingTest.java
assertThat(sepStopwatchA.get()).isNotNull(); // 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.
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Feb 26 02:41:17 GMT 2026 - 7.7K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/collect/InternersTest.java
WeakReference<MyInt> signal = new WeakReference<>(canonical); canonical = null; // Hint to the JIT that canonical is unreachable GcFinalization.awaitClear(signal); assertThat(pool.intern(not)).isSameInstanceAs(not); } private static final class MyInt { private final int i; MyInt(int i) { this.i = i; } @OverrideCreated: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Fri Mar 13 13:01:07 GMT 2026 - 4.5K bytes - Click Count (0) -
guava-tests/test/com/google/common/collect/InternersTest.java
WeakReference<MyInt> signal = new WeakReference<>(canonical); canonical = null; // Hint to the JIT that canonical is unreachable GcFinalization.awaitClear(signal); assertThat(pool.intern(not)).isSameInstanceAs(not); } private static final class MyInt { private final int i; MyInt(int i) { this.i = i; } @OverrideCreated: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Fri Mar 13 13:01:07 GMT 2026 - 4.5K bytes - Click Count (0) -
guava-tests/test/com/google/common/base/AbstractIteratorTest.java
@Override public Object computeNext() { return new Object(); } }; WeakReference<Object> ref = doNextAndGetWeakReference(itr); GcFinalization.awaitClear(ref); } @GwtIncompatible // weak references private WeakReference<Object> doNextAndGetWeakReference(Iterator<Object> itr) { return new WeakReference<>(itr.next()); }Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Fri Mar 13 13:01:07 GMT 2026 - 5.7K bytes - Click Count (0)