Prevent HMCL from crashing when exiting

This commit is contained in:
Glavo authored and Yuhui Huang committed 2022-01-15 01:43:28 +08:00
1 parent d1ba758c6f
commit f1e4e3c753
1 file changed
+5 -2
@@ -258,8 +258,11 @@ public enum OperatingSystem {
public static void forceGC() {
System.gc();
System.runFinalization();
System.gc();
try {
System.runFinalization();
System.gc();
} catch (NoSuchMethodError ignored) {
}
}
public static Path getWorkingDirectory(String folder) {