This project is read-only.

Missing dispose of read stream

Apr 19, 2010 at 11:39 PM


   I have been using DotNetZip in one of my project.  I use it to create a compound file.  It seems I am leaking some readbuffer when I open a zip file. 

I open the zip file using ZipFile.Read(File.ReadAllBytes(filename))  and I call the dispose.  But by using DotTrace, it seem a buffer stays in memory.

I think it could be because of the save function:

I see code like this in ZipFile.Save.cs

if ((_fileAlreadyExists) && (this._readstream != null))
    // This means we opened and read a zip file.
    // If we are now saving to the same file, we need to close the
    // orig file, first.
   this._readstream.Close();   // <------  There is no dispose here.
   this._readstream = null;



Anyone having this problem ?

Apr 21, 2010 at 4:33 PM
Edited Apr 21, 2010 at 4:47 PM

It's possible.  The only way to know, is to test it.

Would you be willing to test a temporary build that I provide to you?