mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-05 00:23:09 +02:00
Garbage collect before/after sync
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user