test/java/lang/annotation/loaderLeak/Main.java
Print this page
*** 55,66 ****
System.gc();
if (c.get() == null) throw new AssertionError();
System.gc();
System.gc();
loader = null;
System.gc();
! System.gc();
if (c.get() != null) throw new AssertionError();
}
}
class SimpleClassLoader extends ClassLoader {
--- 55,71 ----
System.gc();
if (c.get() == null) throw new AssertionError();
System.gc();
System.gc();
loader = null;
+ while(true) {
System.gc();
! Thread.sleep(20);
! if(c.get() == null) {
! break;
! }
! }
if (c.get() != null) throw new AssertionError();
}
}
class SimpleClassLoader extends ClassLoader {