System.gc() to close file descriptors (was RE: status of gcj's bo ehm collector?)

Tom Tromey tromey@redhat.com
Fri Dec 14 12:38:00 GMT 2001


>>>>> "Hans" == Boehm, Hans <hans_boehm@hp.com> writes:

Hans> I looked at the gcj code a little more closely.
Hans> System.runFinalization() also seems to have two other problems:
I think we should get in the habit of reporting all these sorts of
things to Gnats; we've dropped too many issues like this in the past.
Andrew, are you still looking at this?
Hans> 1. BufferedOutputStreams and the like are not flushed if the
Hans> file descriptor is dropped and finalized (or if it persists
Hans> until process exit).
The spec doesn't address this.
One idea would be to reverse-engineer Sun's implementation.
I don't think client code can rely on anything here though.
Hans> 2. There seems to be a minor problem with finalization of
Hans> FileDescriptors. They are closed only if they are still open,
Hans> but the test and the close are done without synchronization.
Thanks.
Tom


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /