neilharvey / FileSignatures

A small library for detecting the type of a file based on header signature (also known as magic number).
MIT License
250 stars 41 forks source link

Reader not disposed when calling IFileFormatReader #59

Closed neilharvey closed 10 months ago

neilharvey commented 11 months ago

The IDisposable object returned by IFileFormatReader is not currently being disposed, which may cause a memory leak when reading Office (CompoundFileBinary or OfficeOpenXml) files:

https://github.com/neilharvey/FileSignatures/blob/bd7ceba4d8c58e86ee17897e5d13c57938eced9a/src/FileSignatures/FileFormatInspector.cs#L89