1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-06-15 16:14:49 +02:00

Add comment about Thread.yield() in MemoryLeakTestUtil

This commit is contained in:
Florian Schmaus 2019-05-09 12:06:01 +02:00
parent 49f4de0cdb
commit 2dedd75cd7

View file

@ -132,6 +132,8 @@ public class MemoryLeakTestUtil {
throw new AssertionError("No observed gargabe collection after " + gcCalls + " calls of System.gc()");
}
System.gc();
// TODO: Would a Thread.yield() here improve the chances of a full GC? It appears that on some systems we
// observe a partial GC here.
gcCalls++;
} while (weakReference.get() != null);