"George T. Joseph" wrote:
> 
> Under 2 of 3 EOF conditions, the InputStream under ChunkyByteArray was not 
> being
> closed before fInputStream was set to null.  This resulted in files being left
> open even after all parsing was complete.   Usually the JVM cleans this up 
> when
> the InputStream is garbage collected.  However, if the GC doesn't run (either
> because a large heap is allocated or because it's turned off) the files remain
> locked.

I would disagree that the ChunkyByteArray is responsible for
closing the stream. My general rule is that if you create
the stream, you close it. Since the ChunkyByteArray doesn't
open the stream, it should not presume that it is allowed
to close it. In fact, I'm thinking that the one place where 
ChunkyByteArray closes fInputStream should be removed.

However, this does bring up a very good point. Are there
places in the code where a stream is opened internal to the
parser, yet not closed? Patches for those conditions would be
gladly accepted! :)

-- 
Andy Clark * IBM, JTC - Silicon Valley * [EMAIL PROTECTED]

Reply via email to