Try to gc when we run out of file handles

Tom Tromey tromey@cygnus.com
Mon Jun 26 10:08:00 GMT 2000


Andrew> There's a memory and file descriptor leak in createTempFile().
Andrew> This fixes it, I think.

I think you can just call "desc.close()" at the end of createTempFile.
FYI there is a PR on this, so include the PR info in the ChangeLog
entry.

Andrew> 	* java/io/natFileDescriptorPosix.cc (open): Run gc when open()
Andrew> 	fails due to too many open files.

You probably want to call System.runFinalization after the GC.
This isn't a guarantee (for some collectors running the GC doesn't
even make sense), but it is still better than what we have now.

Tom


More information about the Java-patches mailing list