- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 14 for WeakReference (0.1 sec)
-
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: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 11.6K 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: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Feb 22 17:40:56 UTC 2024 - 11.9K 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: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 13.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() {
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/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.TimeoutException; import junit.framework.TestCase;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 16.3K bytes - Viewed (0) -
compat/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/reflection/ReflectionValueExtractor.java
* specific language governing permissions and limitations * under the License. */ package org.apache.maven.model.interpolation.reflection; import java.lang.ref.Reference; import java.lang.ref.WeakReference; import java.lang.reflect.Array; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.Arrays; import java.util.List; import java.util.Map; import java.util.Optional;
Registered: Sun Nov 03 03:35:11 UTC 2024 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 10.8K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/ExecutionSequencerTest.java
@GwtIncompatible @J2ObjCIncompatible // gc @AndroidIncompatible public void testCancellationWithReferencedObject() throws Exception { Object toBeGCed = new Object(); WeakReference<Object> ref = new WeakReference<>(toBeGCed); final SettableFuture<@Nullable Void> settableFuture = SettableFuture.create(); ListenableFuture<?> ignored = serializer.submitAsync(
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 16.7K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/ExecutionSequencerTest.java
@GwtIncompatible @J2ObjCIncompatible // gc @AndroidIncompatible public void testCancellationWithReferencedObject() throws Exception { Object toBeGCed = new Object(); WeakReference<Object> ref = new WeakReference<>(toBeGCed); final SettableFuture<@Nullable Void> settableFuture = SettableFuture.create(); ListenableFuture<?> ignored = serializer.submitAsync(
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 16.7K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/ServiceManager.java
copy = ImmutableList.<Service>of(new NoOpService()); } this.state = new ServiceManagerState(copy); this.services = copy; WeakReference<ServiceManagerState> stateReference = new WeakReference<>(state); for (Service service : copy) { service.addListener(new ServiceListener(service, stateReference), directExecutor());
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:51:36 UTC 2024 - 33.5K bytes - Viewed (0) -
guava/src/com/google/common/util/concurrent/ServiceManager.java
copy = ImmutableList.<Service>of(new NoOpService()); } this.state = new ServiceManagerState(copy); this.services = copy; WeakReference<ServiceManagerState> stateReference = new WeakReference<>(state); for (Service service : copy) { service.addListener(new ServiceListener(service, stateReference), directExecutor());
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:51:36 UTC 2024 - 33.2K bytes - Viewed (0)