Force garbage finalization and another gc run in gradle tests.

This commit is contained in:
Ilya Gorbunov
2016-05-18 19:44:18 +03:00
parent 855ddf96fd
commit 9c91b120c9
@@ -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
}