- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 75 for Finalize (0.3 sec)
-
guava-testlib/src/com/google/common/testing/GcFinalization.java
* RuntimeException}. * * <p>Here's an example that tests a {@code finalize} method: * * <pre>{@code * final CountDownLatch latch = new CountDownLatch(1); * Object x = new MyClass() { * ... * protected void finalize() { latch.countDown(); ... } * }; * x = null; // Hint to the JIT that x is stack-unreachable * GcFinalization.await(latch); * }</pre>
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Thu Feb 22 17:40:56 GMT 2024 - 11.6K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/testing/GcFinalization.java
* RuntimeException}. * * <p>Here's an example that tests a {@code finalize} method: * * <pre>{@code * final CountDownLatch latch = new CountDownLatch(1); * Object x = new MyClass() { * ... * protected void finalize() { latch.countDown(); ... } * }; * x = null; // Hint to the JIT that x is stack-unreachable * GcFinalization.await(latch); * }</pre>
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Thu Feb 22 17:40:56 GMT 2024 - 11.6K bytes - Viewed (0) -
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();
Java - Registered: Sun Apr 14 03:35:08 GMT 2024 - Last Modified: Mon Dec 26 15:12:32 GMT 2022 - 4.7K bytes - Viewed (0) -
android/guava-testlib/test/com/google/common/testing/GcFinalizationTest.java
public void testAwait_CountDownLatch() { final CountDownLatch latch = new CountDownLatch(1); Object x = new Object() { @Override protected void finalize() { latch.countDown(); } }; x = null; // Hint to the JIT that x is unreachable GcFinalization.await(latch); assertEquals(0, latch.getCount()); }
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 7.4K bytes - Viewed (0) -
guava-testlib/test/com/google/common/testing/GcFinalizationTest.java
public void testAwait_CountDownLatch() { final CountDownLatch latch = new CountDownLatch(1); Object x = new Object() { @Override protected void finalize() { latch.countDown(); } }; x = null; // Hint to the JIT that x is unreachable GcFinalization.await(latch); assertEquals(0, latch.getCount()); }
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 7.4K bytes - Viewed (0) -
android/guava/src/com/google/common/base/FinalizableSoftReference.java
implements FinalizableReference { /** * Constructs a new finalizable soft reference. * * @param referent to softly reference * @param queue that should finalize the referent */ protected FinalizableSoftReference(@CheckForNull T referent, FinalizableReferenceQueue queue) { super(referent, queue.queue); queue.cleanUp(); }
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Thu Feb 23 15:09:35 GMT 2023 - 1.6K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/FileBackedOutputStreamAndroidIncompatibleTest.java
write(out, data, 0, 100, true); final File file = out.getFile(); assertEquals(100, file.length()); assertTrue(file.exists()); out.close(); // Make sure that finalize deletes the file out = null; // times out and throws RuntimeException on failure GcFinalization.awaitDone( new GcFinalization.FinalizationPredicate() { @Override
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Thu Jun 08 21:20:23 GMT 2023 - 1.7K bytes - Viewed (0) -
guava/src/com/google/common/base/FinalizableWeakReference.java
implements FinalizableReference { /** * Constructs a new finalizable weak reference. * * @param referent to weakly reference * @param queue that should finalize the referent */ protected FinalizableWeakReference(@CheckForNull T referent, FinalizableReferenceQueue queue) { super(referent, queue.queue); queue.cleanUp(); }
Java - Registered: Fri Apr 05 12:43:09 GMT 2024 - Last Modified: Thu Feb 23 15:09:35 GMT 2023 - 1.6K bytes - Viewed (0) -
android/guava/src/com/google/common/base/FinalizablePhantomReference.java
implements FinalizableReference { /** * Constructs a new finalizable phantom reference. * * @param referent to phantom reference * @param queue that should finalize the referent */ protected FinalizablePhantomReference(@CheckForNull T referent, FinalizableReferenceQueue queue) { super(referent, queue.queue); queue.cleanUp(); }
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Thu Feb 23 15:09:35 GMT 2023 - 1.7K bytes - Viewed (0) -
tensorflow/c/eager/c_api_unified_experimental_internal.h
virtual Status AddParameter(DataType dtype, const PartialTensorShape& shape, TracingTensorHandle**) = 0; // Finalize this context and make a function out of it. The context is in a // invalid state after this call and must be destroyed. virtual Status Finalize(OutputList* outputs, AbstractFunction**) = 0; // For LLVM style RTTI. static bool classof(const AbstractContext* ptr) {
C - Registered: Tue Apr 16 12:39:09 GMT 2024 - Last Modified: Fri Nov 13 22:20:40 GMT 2020 - 5.2K bytes - Viewed (0)