-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Bug Description
When scanning a large number of audio files using TagLibSharp2, calling MediaFile.Read(string path) causes memory usage to increase sharply (see attached screenshot). I compared this with the official mono/taglib-sharp, which does not show this behavior.
Steps to Reproduce
- Iterate over a directory containing many audio files (MP3/FLAC/WAV/etc).
- For each file, call MediaFile.Read(filePath) to read tags/properties.
Expected Behavior
Memory usage should remain stable while scanning many files, comparable to mono/taglib-sharp. Temporary buffers should be released promptly after each file is processed.
Actual Behavior
Memory usage grows rapidly while scanning files and does not drop back promptly, eventually causing high memory pressure. This appears to be a leak or retained large buffers.
TagLibSharp2 Version
v0.6.0
Target Framework
.NET 10.0
Operating System
Windows
Additional Context
Is MediaFileResult.File intentionally an object type rather than the IMediaFile interface? It would be clearer and more ergonomic if File were typed as IMediaFile.
I attempted to call Dispose on result.File when available, but memory usage still grows. This suggests large buffers may be held in memory or that some internal objects are not being released.
