Retro68/gcc/libjava/testsuite/libjava.lang/FileHandleGcTest.java
Wolfgang Thaller aaf905ce07 add gcc 4.70
2012-03-28 01:13:14 +02:00

25 lines
413 B
Java

// 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 _)
{
}
}
}