Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for WeakReference (0.51 sec)

  1. 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<>();
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri May 26 11:56:44 UTC 2023
    - 5K bytes
    - Viewed (0)
  2. 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)
  3. 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() {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Jun 10 19:21:11 UTC 2024
    - 7.4K bytes
    - Viewed (0)
  4. 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
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Apr 15 22:32:14 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  5. 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
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Feb 23 15:09:35 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  6. android/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;
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Aug 23 12:54:09 UTC 2023
    - 9.4K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/util/concurrent/FuturesTest.java

        SettableFuture<Long> future1 = SettableFuture.create();
        SettableFuture<Long> future2 = SettableFuture.create();
        WeakReference<SettableFuture<Long>> future1Ref = new WeakReference<>(future1);
        WeakReference<SettableFuture<Long>> future2Ref = new WeakReference<>(future2);
    
        Callable<Long> combiner =
            new Callable<Long>() {
              @Override
              public Long call() {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed May 29 16:29:37 UTC 2024
    - 144.1K bytes
    - Viewed (0)
  8. 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: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Feb 13 14:28:25 UTC 2024
    - 16.8K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/cache/CacheBuilder.java

     *       divided into segments, each of which does LRU internally)
     *   <li>time-based expiration of entries, measured since last access or last write
     *   <li>keys automatically wrapped in {@code WeakReference}
     *   <li>values automatically wrapped in {@code WeakReference} or {@code SoftReference}
     *   <li>notification of evicted (or otherwise removed) entries
     *   <li>accumulation of cache access statistics
     * </ul>
     *
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Feb 15 16:12:13 UTC 2024
    - 44.8K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/base/FinalizableReferenceQueueTest.java

    import com.google.common.annotations.GwtIncompatible;
    import com.google.common.base.internal.Finalizer;
    import com.google.common.testing.GcFinalization;
    import java.lang.ref.ReferenceQueue;
    import java.lang.ref.WeakReference;
    import java.net.URL;
    import java.net.URLClassLoader;
    import java.util.Arrays;
    import java.util.Collections;
    import junit.framework.TestCase;
    import org.checkerframework.checker.nullness.qual.Nullable;
    
    /**
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Jun 10 19:21:11 UTC 2024
    - 4.8K bytes
    - Viewed (0)
Back to top