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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libjava/] [testsuite/] [libjava.lang/] [FileHandleGcTest.java] - Rev 830

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

// Make sure that file handles are garbage collected.
import java.io.*;
public class FileHandleGcTest
{
  static void kill () throws FileNotFoundException
  {
    for (int i = 0; i < 65536; i++)
      {
	FileInputStream f = new FileInputStream ("/dev/null");
      }
  }
 
  public static void
  main (String argv [])
  {
    try
      {
	kill ();
      }
    catch (FileNotFoundException _)
      {
      }
  }
}
 

Go to most recent revision | 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.