- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 20 for WeakReference (1.45 sec)
-
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:
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Mar 13 14:30:51 UTC 2023 - 12.8K bytes - Viewed (0) -
guava-tests/test/com/google/common/base/FinalizableReferenceQueueClassLoaderUnloadingTest.java
AtomicReference<Object> sepStopwatchA = new AtomicReference<Object>(sepStopwatchC.getMethod("createUnstarted").invoke(null)); AtomicReference<WeakReference<?>> sepStopwatchRef = new AtomicReference<WeakReference<?>>( (WeakReference<?>) sepFwrCons.newInstance(sepStopwatchA.get(), sepFrqA.get())); assertNotNull(sepStopwatchA.get()); // Clear all references to the Stopwatch and wait for it to be gc'd.
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed May 29 16:29:37 UTC 2024 - 13.3K 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() {
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Thu Feb 22 17:40:56 UTC 2024 - 11.6K 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:
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Mar 13 14:30:51 UTC 2023 - 12.8K 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() {
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Thu Feb 22 17:40:56 UTC 2024 - 11.6K bytes - Viewed (0) -
platforms/core-runtime/client-services/src/main/java/org/gradle/internal/daemon/client/serialization/ClientSidePayloadClassLoaderRegistry.java
mapping.classLoaders.add(new WeakReference<>(candidate)); } classLoaders.put(uuid, mapping); return mapping.details; } finally { lock.unlock(); } } private static class LocalClassLoaderMapping { private final Set<WeakReference<ClassLoader>> classLoaders = new LinkedHashSet<>();
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Wed May 15 19:53:31 UTC 2024 - 10K bytes - Viewed (0) -
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
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Thu Feb 22 17:40:56 UTC 2024 - 11.9K 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
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Thu Dec 14 20:35:03 UTC 2023 - 10.3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/FuturesGetCheckedTest.java
import com.google.common.util.concurrent.FuturesGetCheckedInputs.TwoArgConstructorException; import com.google.common.util.concurrent.FuturesGetCheckedInputs.TwoArgConstructorRuntimeException; import java.lang.ref.WeakReference; import java.net.URLClassLoader; import java.util.concurrent.CancellationException; import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException;
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 16.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/FuturesGetCheckedTest.java
import com.google.common.util.concurrent.FuturesGetCheckedInputs.TwoArgConstructorException; import com.google.common.util.concurrent.FuturesGetCheckedInputs.TwoArgConstructorRuntimeException; import java.lang.ref.WeakReference; import java.net.URLClassLoader; import java.util.concurrent.CancellationException; import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException;
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 16.4K bytes - Viewed (0)