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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libjava/] [testsuite/] [libjava.loader/] [TestLeak.java] - Rev 765

Compare with Previous | Blame | View Log

import java.net.*;
import java.lang.reflect.Proxy;
 
public class TestLeak
{
  static 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 ();
    }
  }
}
 
 
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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