Garbage collect before/after sync

This commit is contained in:
M66B
2024-02-09 20:28:11 +01:00
parent 9769e774ea
commit 01383680d2
4 changed files with 13 additions and 19 deletions

View File

@@ -3536,18 +3536,12 @@ public class Helper {
// Miscellaneous
static void gc() {
gc(false);
}
static void gc(boolean force) {
if (force || BuildConfig.DEBUG) {
static void gc(String reason) {
try {
Log.i("GC " + reason);
Runtime.getRuntime().gc();
try {
Thread.sleep(50);
} catch (InterruptedException ex) {
Log.e(ex);
}
} catch (Throwable ex) {
Log.e(ex);
}
}