Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for _finalize (0.06 sec)

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

       * separate method to make it somewhat more likely to be unreachable.
       */
      private static void createUnreachableLatchFinalizer(CountDownLatch latch) {
        Object unused =
            new Object() {
              @SuppressWarnings({"removal", "Finalize"}) // b/260137033
              @Override
              protected void finalize() {
                latch.countDown();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  2. android/guava-testlib/src/com/google/common/testing/GcFinalization.java

       * separate method to make it somewhat more likely to be unreachable.
       */
      private static void createUnreachableLatchFinalizer(CountDownLatch latch) {
        Object unused =
            new Object() {
              @SuppressWarnings({"removal", "Finalize"}) // b/260137033
              @Override
              protected void finalize() {
                latch.countDown();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/base/FinalizableReferenceQueueClassLoaderUnloadingTest.java

        GcFinalization.awaitClear(finalizableWeakReference);
    
        Field sepFrqUserFinalizedF = sepFrqUserC.getField("finalized");
        Semaphore finalizeCount = (Semaphore) sepFrqUserFinalizedF.get(null);
        boolean finalized = finalizeCount.tryAcquire(5, SECONDS);
        assertTrue(finalized);
    
        Field sepFrqUserFrqF = sepFrqUserC.getField("frq");
        Closeable frq = (Closeable) sepFrqUserFrqF.get(null);
        frq.close();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  4. android/guava-testlib/test/com/google/common/testing/GcFinalizationTest.java

      public void testAwait_countDownLatch() {
        final CountDownLatch latch = new CountDownLatch(1);
        Object unused =
            new Object() {
              @SuppressWarnings({"removal", "Finalize"}) // b/260137033
              @Override
              protected void finalize() {
                latch.countDown();
              }
            };
        unused = null; // Hint to the JIT that unused is unreachable
        GcFinalization.await(latch);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 02:42:09 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  5. guava-testlib/test/com/google/common/testing/GcFinalizationTest.java

      public void testAwait_countDownLatch() {
        final CountDownLatch latch = new CountDownLatch(1);
        Object unused =
            new Object() {
              @SuppressWarnings({"removal", "Finalize"}) // b/260137033
              @Override
              protected void finalize() {
                latch.countDown();
              }
            };
        unused = null; // Hint to the JIT that unused is unreachable
        GcFinalization.await(latch);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 02:42:09 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/base/FinalizableReferenceQueueTest.java

      public void testGetFinalizerUrl() {
        assertNotNull(getClass().getResource("internal/Finalizer.class"));
      }
    
      public void testFinalizeClassHasNoNestedClasses() throws Exception {
        // Ensure that the Finalizer class has no nested classes.
        // See https://github.com/google/guava/issues/1505
        assertEquals(Collections.emptyList(), Arrays.asList(Finalizer.class.getDeclaredClasses()));
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 14:28:19 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  7. compat/maven-compat/src/test/java/org/apache/maven/artifact/testutils/TestFileManager.java

        }
    
        public String getFileContents(File file, String encoding) throws IOException {
            return FileUtils.fileRead(file, encoding);
        }
    
        protected void finalize() throws Throwable {
            maybeWarnAboutCleanUp();
    
            super.finalize();
        }
    
        public File createFile(String filename, String content, String encoding) throws IOException {
            File dir = createTempDir();
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/collect/ImmutableMapTest.java

        oos.writeObject(map);
        oos.flush();
    
        int mapSize = bytes.size();
        oos.writeObject(keySet);
        oos.writeObject(values);
        oos.close();
    
        int finalSize = bytes.size();
    
        assertThat(finalSize - mapSize).isLessThan(100);
      }
    
      // TODO: Re-enable this test after moving to new serialization format in ImmutableMap.
      @J2ktIncompatible
      @GwtIncompatible // SerializableTester
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 41.1K bytes
    - Viewed (0)
  9. docs/pt/docs/advanced/events.md

    ///
    
    ### `startup` e `shutdown` juntos
    
    Há uma grande chance que a lógica para sua *inicialização* e *encerramento* esteja conectada, você pode querer iniciar alguma coisa e então finalizá-la, adquirir um recurso e então liberá-lo, etc.
    
    Fazendo isso em funções separadas que não compartilham lógica ou variáveis entre elas é mais difícil já que você precisa armazenar os valores em variáveis globais ou truques parecidos.
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 8.6K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/collect/ImmutableMapTest.java

        oos.writeObject(map);
        oos.flush();
    
        int mapSize = bytes.size();
        oos.writeObject(keySet);
        oos.writeObject(values);
        oos.close();
    
        int finalSize = bytes.size();
    
        assertThat(finalSize - mapSize).isLessThan(100);
      }
    
      public void testEquals() {
        new EqualsTester()
            .addEqualityGroup(
                ImmutableMap.of(),
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 36.6K bytes
    - Viewed (0)
Back to top