Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 25 for finalization (0.05 sec)

  1. guava-testlib/src/com/google/common/testing/GcFinalization.java

     * };
     * x = null;  // Hint to the JIT that x is stack-unreachable
     * GcFinalization.await(latch);
     * }
     *
     * <p>Here's an example that uses a user-defined finalization predicate:
     *
     * {@snippet :
     * final WeakHashMap<Object, Object> map = new WeakHashMap<>();
     * map.put(new Object(), Boolean.TRUE);
     * GcFinalization.awaitDone(new FinalizationPredicate() {
     *   public boolean isDone() {
     *     return map.isEmpty();
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Mar 17 20:26:29 UTC 2025
    - 11.5K bytes
    - Viewed (0)
  2. android/guava-testlib/src/com/google/common/testing/GcFinalization.java

     * };
     * x = null;  // Hint to the JIT that x is stack-unreachable
     * GcFinalization.await(latch);
     * }
     *
     * <p>Here's an example that uses a user-defined finalization predicate:
     *
     * {@snippet :
     * final WeakHashMap<Object, Object> map = new WeakHashMap<>();
     * map.put(new Object(), Boolean.TRUE);
     * GcFinalization.awaitDone(new FinalizationPredicate() {
     *   public boolean isDone() {
     *     return map.isEmpty();
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Mar 17 20:26:29 UTC 2025
    - 11.5K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/hash/SipHashFunction.java

      // The number of compression rounds.
      private final int c;
      // The number of finalization rounds.
      private final int d;
      // Two 64-bit keys (represent a single 128-bit key).
      private final long k0;
      private final long k1;
    
      /**
       * @param c the number of compression rounds (must be positive)
       * @param d the number of finalization rounds (must be positive)
       * @param k0 the first half of the key
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Feb 13 17:34:21 UTC 2025
    - 5.3K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/io/FileBackedOutputStreamAndroidIncompatibleTest.java

    import static com.google.common.io.FileBackedOutputStreamTest.write;
    
    import com.google.common.testing.GcFinalization;
    import java.io.File;
    import org.jspecify.annotations.NullUnmarked;
    
    /**
     * Android-incompatible tests for {@link FileBackedOutputStream}.
     *
     * @author Chris Nokleberg
     */
    @AndroidIncompatible // Finalization probably just doesn't happen fast enough?
    @NullUnmarked
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 1.7K bytes
    - Viewed (0)
  5. src/main/java/jcifs/smb/SmbFileHandleImpl.java

                }
            } catch (Exception e) {
                log.error("Error during file handle finalization", e);
            } finally {
                super.finalize();
            }
        }
    
        /**
         * Emergency cleanup method to prevent resource leaks during finalization
         */
        private void emergencyCloseHandle() {
            try {
                synchronized (this) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 9.4K bytes
    - Viewed (1)
  6. src/main/java/jcifs/smb/SmbTreeImpl.java

                    emergencyCleanup();
                }
            } catch (Exception e) {
                log.error("Error during tree finalization", e);
            } finally {
                super.finalize();
            }
        }
    
        /**
         * Emergency cleanup method to prevent memory leaks during finalization
         */
        private void emergencyCleanup() {
            try {
                // Force usage count to zero
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 30K bytes
    - Viewed (0)
  7. guava/src/com/google/common/hash/Murmur3_32HashFunction.java

        k1 *= C2;
        return k1;
      }
    
      private static int mixH1(int h1, int k1) {
        h1 ^= k1;
        h1 = Integer.rotateLeft(h1, 13);
        h1 = h1 * 5 + 0xe6546b64;
        return h1;
      }
    
      // Finalization mix - force all bits of a hash block to avalanche
      private static HashCode fmix(int h1, int length) {
        h1 ^= length;
        h1 ^= h1 >>> 16;
        h1 *= 0x85ebca6b;
        h1 ^= h1 >>> 13;
        h1 *= 0xc2b2ae35;
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Apr 14 16:36:11 UTC 2025
    - 11.8K bytes
    - Viewed (0)
  8. src/test/java/jcifs/smb/SmbTreeConnectionTraceTest.java

            CIFSContext ctx = mock(CIFSContext.class);
            SmbTreeConnectionTrace trace = Mockito.spy(new SmbTreeConnectionTrace(ctx));
    
            // Act: directly invoke finalize to simulate GC finalization path
            trace.finalize();
    
            // Assert: verify that finalize delegated to checkRelease()
            verify(trace, times(1)).checkRelease();
        }
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 8.7K bytes
    - Viewed (0)
  9. src/test/java/jcifs/smb/PreauthIntegrityServiceTest.java

            assertNotNull(supported);
            assertEquals(1, supported.length);
            assertEquals(PreauthIntegrityService.HASH_ALGO_SHA512, supported[0]);
        }
    
        @Test
        @DisplayName("Test session finalization")
        public void testSessionFinalization() throws CIFSException {
            String sessionId = "test-session-4";
            byte[] salt = preauthService.generatePreauthSalt();
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 11.1K bytes
    - Viewed (0)
  10. src/main/java/jcifs/smb/SmbTreeHandleImpl.java

                    emergencyReleaseHandle();
                }
            } catch (Exception e) {
                log.error("Error during tree handle finalization", e);
            } finally {
                super.finalize();
            }
        }
    
        private void emergencyReleaseHandle() {
            try {
                // Force release the handle with null checks
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 11.1K bytes
    - Viewed (0)
Back to top