OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libjava/] [testsuite/] [libjava.loader/] [TestLeak.java] - Blame information for rev 778

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 765 jeremybenn
import java.net.*;
2
import java.lang.reflect.Proxy;
3
 
4
public class TestLeak
5
{
6
  static 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
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.