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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libjava/] [testsuite/] [libjava.lang/] [FileHandleGcTest.java] - Blame information for rev 861

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

Line No. Rev Author Line
1 765 jeremybenn
// Make sure that file handles are garbage collected.
2
import java.io.*;
3
public class FileHandleGcTest
4
{
5
  static void kill () throws FileNotFoundException
6
  {
7
    for (int i = 0; i < 65536; i++)
8
      {
9
        FileInputStream f = new FileInputStream ("/dev/null");
10
      }
11
  }
12
 
13
  public static void
14
  main (String argv [])
15
  {
16
    try
17
      {
18
        kill ();
19
      }
20
    catch (FileNotFoundException _)
21
      {
22
      }
23
  }
24
}

powered by: WebSVN 2.1.0

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