- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 50 for WeakReference (2.36 sec)
-
android/guava-tests/test/com/google/common/util/concurrent/StripedTest.java
public void testStrongImplementations() { for (Striped<?> striped : strongImplementations()) { WeakReference<Object> weakRef = new WeakReference<>(striped.get(new Object())); WeakReference<Object> garbage = new WeakReference<>(new Object()); GcFinalization.awaitClear(garbage); assertNotNull(weakRef.get()); } } public void testMaximalWeakStripedLock() {
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Feb 09 22:57:07 GMT 2022 - 8.4K bytes - Viewed (0) -
guava-testlib/test/com/google/common/testing/GcFinalizationTest.java
GcFinalization.awaitDone(future); 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() {
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 7.4K bytes - Viewed (0) -
android/guava-testlib/test/com/google/common/testing/GcFinalizationTest.java
GcFinalization.awaitDone(future); 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() {
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 7.4K bytes - Viewed (0) -
android/guava/src/com/google/common/base/Platform.java
WeakReference<? extends Enum<?>> ref = Enums.getEnumConstants(enumClass).get(value); /* * We use `fromNullable` instead of `of` because `WeakReference.get()` has a nullable return * type. * * In practice, we are very unlikely to see `null`: The `WeakReference` to the enum constant
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Mon Apr 15 22:32:14 GMT 2024 - 3.8K bytes - Viewed (0) -
guava/src/com/google/common/base/internal/Finalizer.java
* the License. */ package com.google.common.base.internal; import java.lang.ref.PhantomReference; import java.lang.ref.Reference; import java.lang.ref.ReferenceQueue; import java.lang.ref.WeakReference; import java.lang.reflect.Constructor; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.util.logging.Level; import java.util.logging.Logger; import javax.annotation.CheckForNull;
Java - Registered: Fri Apr 05 12:43:09 GMT 2024 - Last Modified: Wed Aug 23 12:54:09 GMT 2023 - 9.4K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/MapMaker.java
import java.lang.ref.WeakReference; import java.util.ConcurrentModificationException; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import javax.annotation.CheckForNull; /** * A builder of {@link ConcurrentMap} instances that can have keys or values automatically wrapped * in {@linkplain WeakReference weak} references. * * <p>Usage example:
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Mon Mar 13 14:30:51 GMT 2023 - 12.8K bytes - Viewed (0) -
guava/src/com/google/common/base/Platform.java
* the License. */ package com.google.common.base; import com.google.common.annotations.GwtCompatible; import java.lang.ref.WeakReference; import java.util.Locale; import java.util.ServiceConfigurationError; import java.util.logging.Level; import java.util.logging.Logger; import java.util.regex.Pattern; import javax.annotation.CheckForNull; /**
Java - Registered: Fri Apr 05 12:43:09 GMT 2024 - Last Modified: Mon Jun 26 17:58:45 GMT 2023 - 3.3K bytes - Viewed (0) -
guava-testlib/src/com/google/common/testing/GcFinalization.java
* leaks, by ensuring that objects are no longer strongly referenced: * * <pre>{@code * // Helper function keeps victim stack-unreachable. * private WeakReference<Foo> fooWeakRef() { * Foo x = ....; * WeakReference<Foo> weakRef = new WeakReference<>(x); * // ... use x ... * x = null; // Hint to the JIT that x is stack-unreachable * return weakRef; * } * public void testFooLeak() {
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Thu Feb 22 17:40:56 GMT 2024 - 11.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/base/EnumsTest.java
public void testGetIfPresent_doesNotPreventClassUnloading() throws Exception { WeakReference<?> shadowLoaderReference = doTestClassUnloading(); GcFinalization.awaitClear(shadowLoaderReference); } // Create a second ClassLoader and use it to get a second version of the TestEnum class. // Run Enums.getIfPresent on that other TestEnum and then return a WeakReference containing the
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Tue Oct 03 20:10:02 GMT 2023 - 8.8K bytes - Viewed (0) -
guava/src/com/google/common/base/FinalizableWeakReference.java
*/ package com.google.common.base; import com.google.common.annotations.GwtIncompatible; import com.google.common.annotations.J2ktIncompatible; import java.lang.ref.ReferenceQueue; import java.lang.ref.WeakReference; import javax.annotation.CheckForNull; /** * Weak reference with a {@code finalizeReferent()} method which a background thread invokes after
Java - Registered: Fri Apr 05 12:43:09 GMT 2024 - Last Modified: Thu Feb 23 15:09:35 GMT 2023 - 1.6K bytes - Viewed (0)