- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 50 for WeakReference (0.21 sec)
-
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 Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Feb 09 22:57:07 GMT 2022 - 8.4K bytes - Viewed (0) -
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 Apr 19 12:43:09 GMT 2024 - Last Modified: Tue Oct 03 20:10:02 GMT 2023 - 8.8K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/FuturesGetChecked.java
* UnsignedBytesBenchmark. TODO(cpovirk): benchmark this */ /* * A CopyOnWriteArraySet<WeakReference> is faster than a newSetFromMap of a MapMaker map with * weakKeys() and concurrencyLevel(1), even up to at least 12 cached exception types. */ private static final Set<WeakReference<Class<? extends Exception>>> validClasses = new CopyOnWriteArraySet<>(); @Override
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Thu Dec 14 20:35:03 GMT 2023 - 10.3K bytes - Viewed (0) -
android/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 26 12:43:10 GMT 2024 - Last Modified: Thu Feb 23 15:09:35 GMT 2023 - 1.6K bytes - Viewed (0) -
android/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 26 12:43:10 GMT 2024 - Last Modified: Thu Feb 22 17:40:56 GMT 2024 - 11.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/cache/CacheReferencesTest.java
import com.google.common.cache.TestingRemovalListeners.CountingRemovalListener; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterables; import java.lang.ref.WeakReference; import junit.framework.TestCase; /** * Tests of basic {@link LoadingCache} operations with all possible combinations of key & value * strengths. * * @author mike nonemacher */
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Mon Dec 04 17:37:03 GMT 2017 - 6.1K 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) -
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/src/com/google/common/base/Enums.java
} @GwtIncompatible // java.lang.ref.WeakReference private static final Map<Class<? extends Enum<?>>, Map<String, WeakReference<? extends Enum<?>>>> enumConstantCache = new WeakHashMap<>(); @GwtIncompatible // java.lang.ref.WeakReference private static <T extends Enum<T>> Map<String, WeakReference<? extends Enum<?>>> populateCache( Class<T> enumClass) { Map<String, WeakReference<? extends Enum<?>>> result = new HashMap<>();
Java - Registered: Fri Apr 05 12:43:09 GMT 2024 - Last Modified: Fri May 26 11:56:44 GMT 2023 - 5K bytes - Viewed (0) -
android/guava/src/com/google/common/base/Enums.java
} @GwtIncompatible // java.lang.ref.WeakReference private static final Map<Class<? extends Enum<?>>, Map<String, WeakReference<? extends Enum<?>>>> enumConstantCache = new WeakHashMap<>(); @GwtIncompatible // java.lang.ref.WeakReference private static <T extends Enum<T>> Map<String, WeakReference<? extends Enum<?>>> populateCache( Class<T> enumClass) { Map<String, WeakReference<? extends Enum<?>>> result = new HashMap<>();
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Fri May 26 11:56:44 GMT 2023 - 5K bytes - Viewed (0)