Force garbage finalization and another gc run in gradle tests.
This commit is contained in:
+2
@@ -85,6 +85,8 @@ class CleanUpBuildListener(pluginClassLoader: ClassLoader, private val project:
|
||||
|
||||
log.lifecycle(FORCE_SYSTEM_GC_MESSAGE)
|
||||
System.gc()
|
||||
System.runFinalization()
|
||||
System.gc()
|
||||
val rt = Runtime.getRuntime()
|
||||
return (rt.totalMemory() - rt.freeMemory()) / 1024
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user