- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for FinalizableReferenceQueue (0.17 sec)
-
guava/src/com/google/common/base/FinalizableReferenceQueue.java
* number of well-known problems. Here is how you might use this class instead: * * {@snippet : * public class MyServer implements Closeable { * private static final FinalizableReferenceQueue frq = new FinalizableReferenceQueue(); * // You might also share this between several objects. * * private static final Set<Reference<?>> references = Sets.newConcurrentHashSet();Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Sat Aug 09 01:14:59 UTC 2025 - 14.7K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/base/FinalizableReferenceQueueTest.java
@RunWith(JUnit4.class) @NullUnmarked public class FinalizableReferenceQueueTest { private @Nullable FinalizableReferenceQueue frq; @After public void tearDown() throws Exception { frq = null; } @Test public void testFinalizeReferentCalled() { MockReference reference = new MockReference(frq = new FinalizableReferenceQueue()); GcFinalization.awaitDone(() -> reference.finalizeReferentCalled); }Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Dec 11 20:07:52 UTC 2025 - 8.7K bytes - Viewed (0) -
guava-tests/test/com/google/common/base/FinalizableReferenceQueueClassLoaderUnloadingTest.java
/* * The following tests check that the use of FinalizableReferenceQueue does not prevent the * ClassLoader that loaded that class from later being garbage-collected. If anything continues * to reference the FinalizableReferenceQueue class then its ClassLoader cannot be * garbage-collected, even if there are no more instances of FinalizableReferenceQueue itself. * The code in FinalizableReferenceQueue goes to considerable trouble to ensure that there are
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue May 13 18:46:00 UTC 2025 - 7.6K bytes - Viewed (0) -
android/guava/src/com/google/common/base/internal/Finalizer.java
/** * Starts the Finalizer thread. FinalizableReferenceQueue calls this method reflectively. * * @param finalizableReferenceClass FinalizableReference.class. * @param queue a reference queue that the thread will poll. * @param frqReference a phantom reference to the FinalizableReferenceQueue, which will be queued * either when the FinalizableReferenceQueue is no longer referenced anywhere, or when its
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Sun Dec 22 03:38:46 UTC 2024 - 9.3K bytes - Viewed (0) -
android/guava/src/com/google/common/base/FinalizableWeakReference.java
* Constructs a new finalizable weak reference. * * @param referent to weakly reference * @param queue that should finalize the referent */ protected FinalizableWeakReference(@Nullable T referent, FinalizableReferenceQueue queue) { super(referent, queue.queue); queue.cleanUp(); }
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Sun Dec 22 03:38:46 UTC 2024 - 1.5K bytes - Viewed (0) -
guava/src/com/google/common/base/FinalizableReference.java
import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.DoNotMock; /** * Implemented by references that have code to run after garbage collection of their referents. * * @see FinalizableReferenceQueue * @author Bob Lee * @since 2.0 */ @DoNotMock("Use an instance of one of the Finalizable*Reference classes") @J2ktIncompatible @GwtIncompatible public interface FinalizableReference { /**Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Sat Dec 21 03:10:51 UTC 2024 - 1.4K bytes - Viewed (0) -
android/guava/src/com/google/common/base/FinalizablePhantomReference.java
* * @param referent to phantom reference * @param queue that should finalize the referent */ protected FinalizablePhantomReference(@Nullable T referent, FinalizableReferenceQueue queue) { super(referent, queue.queue); queue.cleanUp(); }
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Sun Dec 22 03:38:46 UTC 2024 - 1.6K bytes - Viewed (0)