[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Small ZipFile patch
From: |
Tom Tromey |
Subject: |
Re: Small ZipFile patch |
Date: |
04 Mar 2003 09:38:56 -0700 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
>>>>> "Jeroen" == Jeroen Frijters <address@hidden> writes:
Jeroen> BTW, the design of the 1.0 I/O classes is less than
Jeroen> stellar. Since the FileDescriptor class is the owner of the
Jeroen> native resource, it should have had a finalizer, instead of
Jeroen> FileInputStream and FileOutputStream (for some reason
Jeroen> RandomAccessFile doesn't have a finalizer).
It isn't a compatibility problem to decide what class should have a
nontrivial finalizer. We're free to rearrange things here.
In libgcj we have a finalizer in FileDescriptor. I think this is the
only place you should have a finalizer that closes the underlying
native file descriptor. Otherwise you run into problems here and
there; we had some bug reports about this a couple years ago.
Tom