New files.

From-SVN: r58778
This commit is contained in:
Anthony Green 2002-11-04 01:31:12 +00:00 committed by Anthony Green
parent c9fe6f9f39
commit 55376e4128
8 changed files with 147 additions and 0 deletions

View file

@ -0,0 +1,33 @@
import java.net.*;
import java.lang.reflect.*;
public class TestLeak
{
class MyLoader extends URLClassLoader
{
public MyLoader (URL urls[])
{
super (urls);
}
}
public static void main (String[] args)
{
URLClassLoader ucl =
(URLClassLoader) ClassLoader.getSystemClassLoader();
URL urls[] = ucl.getURLs ();
Class ifaces[] = new Class[1];
ifaces[0] = java.lang.Comparable.class;
try {
for (int i = 0; i < 100; i++)
{
Proxy.getProxyClass (new MyLoader (urls), ifaces);
}
} catch (Exception e) {
e.printStackTrace ();
}
}
}