mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
removed logging
This commit is contained in:
@@ -47,7 +47,7 @@ public class GCUtil {
|
||||
*/
|
||||
@TestOnly
|
||||
public static void tryGcSoftlyReachableObjects() {
|
||||
long started = System.nanoTime();
|
||||
//long started = System.nanoTime();
|
||||
ReferenceQueue<Object> q = new ReferenceQueue<Object>();
|
||||
SoftReference<Object> ref = new SoftReference<Object>(new Object(), q);
|
||||
ArrayList<SoftReference<?>> list = ContainerUtil.newArrayListWithCapacity(100 + useReference(ref));
|
||||
@@ -71,7 +71,7 @@ public class GCUtil {
|
||||
|
||||
// do not leave a chance for our created SoftReference's content to lie around until next full GC's
|
||||
for(SoftReference createdReference:list) createdReference.clear();
|
||||
System.out.println("Done gc'ing refs:" + ((System.nanoTime() - started) / 1000000));
|
||||
//System.out.println("Done gc'ing refs:" + ((System.nanoTime() - started) / 1000000));
|
||||
}
|
||||
|
||||
private static int useReference(SoftReference<Object> ref) {
|
||||
|
||||
Reference in New Issue
Block a user