- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for gc (0.2 sec)
-
okhttp-testing-support/src/main/kotlin/okhttp3/TestUtilJvm.kt
} /** * See FinalizationTester for discussion on how to best trigger GC in tests. * https://android.googlesource.com/platform/libcore/+/master/support/src/test/java/libcore/ * java/lang/ref/FinalizationTester.java */ @Throws(Exception::class) @JvmStatic fun awaitGarbageCollection() { Runtime.getRuntime().gc() Thread.sleep(100) System.runFinalization() } @JvmStatic
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Thu Apr 11 22:09:35 GMT 2024 - 4.3K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CallTest.kt
response: Response, ) { // Ignore the response so it gets leaked then GC'd. latch.countDown() } }, ) latch.await() // There's some flakiness when triggering a GC for objects in a separate thread. Adding a // small delay appears to ensure the objects will get GC'd. Thread.sleep(200) awaitGarbageCollection() val message = testLogHandler.take()
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Apr 10 19:46:48 GMT 2024 - 142.5K bytes - Viewed (0)