mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-26 05:52:06 +01:00
Add comment about Thread.yield() in MemoryLeakTestUtil
This commit is contained in:
parent
49f4de0cdb
commit
2dedd75cd7
1 changed files with 2 additions and 0 deletions
|
@ -132,6 +132,8 @@ public class MemoryLeakTestUtil {
|
||||||
throw new AssertionError("No observed gargabe collection after " + gcCalls + " calls of System.gc()");
|
throw new AssertionError("No observed gargabe collection after " + gcCalls + " calls of System.gc()");
|
||||||
}
|
}
|
||||||
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++;
|
gcCalls++;
|
||||||
} while (weakReference.get() != null);
|
} while (weakReference.get() != null);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue