Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 43 for WeakReference (0.12 sec)

  1. 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)
  2. android/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() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jun 26 12:58:35 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  3. 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() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jun 26 12:58:35 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/collect/InternersTest.java

        Integer canonical = new Integer(5);
        Integer not = new Integer(5);
    
        Interner<Integer> pool = Interners.newWeakInterner();
        assertSame(canonical, pool.intern(canonical));
    
        WeakReference<Integer> signal = new WeakReference<>(canonical);
        canonical = null; // Hint to the JIT that canonical is unreachable
    
        GcFinalization.awaitClear(signal);
        assertSame(not, pool.intern(not));
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jul 24 22:09:38 UTC 2024
    - 4K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/base/AbstractIteratorTest.java

        Iterator<Object> itr =
            new AbstractIterator<Object>() {
              @Override
              public Object computeNext() {
                return new Object();
              }
            };
        WeakReference<Object> ref = new WeakReference<>(itr.next());
        GcFinalization.awaitClear(ref);
      }
    
      public void testReentrantHasNext() {
        Iterator<Integer> iter =
            new AbstractIterator<Integer>() {
              @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Sep 17 18:14:12 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  6. 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)
  7. 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
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed May 29 16:29:37 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  8. 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)
  9. 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: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 23 15:09:35 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  10. 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: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 23 15:09:35 UTC 2023
    - 1.6K bytes
    - Viewed (0)
Back to top