I’m still testing your component an found out, that your .NET Zip Component has in Xceed.Zip.ZipHandler a Hashtable named mg_zipHandlerTable. This Member is static private and stores MemoryStreams. I will use my ZipComponent for a service that zip’s/unzipp’s around 500 Zip Files a day and should run 24/7.
How can i free this Memory?
Imported from legacy forums. Posted by mstruggl (had 2341 views)
All these instances use the same “AbstractFile” as the actual zip file. But “ZIP” intelligence isn’t in a DiskFile instance. What happens is when you create the first instance of a ZippedFile, ZippedFolder or ZipArchive (the root ZippedFolder), a “ZipHandler” is searched in the mg_zipHandlerTable, using (a variation of) the provided AbstractFile as the key. If not found, a new ZipHandler instance is created.
This way, any ZippedFile, ZippedFolder or ZipArchive instance working with the same AbstractFile can safely affect the same zip file. We decided not to make ZippedFile, ZippedFolder (and ZipArchive) IDisposable, for compatibility with other derived classes of AbstractFile or AbstractFolder. That means the ZipHandler will get removed from the hashtable only when the last instance using that AbstractFile will get garbage collected.
Now, make sure to use the latest version, as versions before 2.0.108 had a bug causing ZipHandler not to get removed at all!
Imported from legacy forums. Posted by Martin (had 3521 views)