From 29258132152e2b0b6670fffc366598ccc2b00351 Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Tue, 29 May 2018 19:10:36 +1000 Subject: + Added a display string to the GUI of the threaded buffers, showing seconds remaining before the thread belonging to this buffer is released. This will also show ms/25 lag info someday. + Added invokeGC() to SystemUtils.java. $ More thread safety. --- src/Java/gtPlusPlus/core/util/sys/SystemUtils.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/Java/gtPlusPlus/core/util/sys') diff --git a/src/Java/gtPlusPlus/core/util/sys/SystemUtils.java b/src/Java/gtPlusPlus/core/util/sys/SystemUtils.java index efcfaf8d04..2788ba688e 100644 --- a/src/Java/gtPlusPlus/core/util/sys/SystemUtils.java +++ b/src/Java/gtPlusPlus/core/util/sys/SystemUtils.java @@ -14,6 +14,19 @@ public class SystemUtils { } } + /** + * Try invoke the runtime's Garbage Collector. + */ + public static void invokeGC() { + try { + Runtime r = Runtime.getRuntime(); + r.gc(); + } + catch (Throwable t) { + //Do nothing. + } + } + public static boolean isWindows() { return (getOSString().indexOf("win") >= 0); } -- cgit