Skip to content

Calling Close or Dispose on zip entry stream, and finalizers #44

Open
@dgrunwald

Description

@dgrunwald

SD-1880, originally created on 1/27/2012 05:55:20 by David Pierson

Several posters have reported issues when calling Flush Close and
Dispose on the stream they get from GetInputStream.

Worth remarking for any readers, it is recommended not to call any of
those methods against the entry stream.

Threads:
System.ObjectDisposedException: Cannot access a closed
file

http://community.sharpdevelop.net/forums/t/14397.aspx

Even without calling Close/Dispose the .NET GC may finalise the outer
stream while still using the entry stream. Believe this has been fixed
in 0.85.5 - worth desk checking.
Thread:
Random bug while
unzipping

"There is a flaw in the dispose method of ZipFile also which isnt
checking for disposing before closing streams. The f
inalizer for ZipFile can indeed be removed as Daniel states.  There is
nothing for it to do once you correct the flaw above."

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions