source: trunk/gcc/libjava/testsuite/libjava.loader/TestLeak.java

Last change on this file was 1389, checked in by bird, 21 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 607 bytes
Line 
1import java.net.*;
2import java.lang.reflect.*;
3
4public class TestLeak
5{
6 class MyLoader extends URLClassLoader
7 {
8 public MyLoader (URL urls[])
9 {
10 super (urls);
11 }
12 }
13
14 public static void main (String[] args)
15 {
16 URLClassLoader ucl =
17 (URLClassLoader) ClassLoader.getSystemClassLoader();
18 URL urls[] = ucl.getURLs ();
19 Class ifaces[] = new Class[1];
20 ifaces[0] = java.lang.Comparable.class;
21
22 try {
23 for (int i = 0; i < 100; i++)
24 {
25 Proxy.getProxyClass (new MyLoader (urls), ifaces);
26 }
27 } catch (Exception e) {
28 e.printStackTrace ();
29 }
30 }
31}
32
33
Note: See TracBrowser for help on using the repository browser.