Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory Leak in MediaInfoWrapper Usage #52

Open
Vesperino opened this issue Apr 18, 2024 · 0 comments
Open

Memory Leak in MediaInfoWrapper Usage #52

Vesperino opened this issue Apr 18, 2024 · 0 comments

Comments

@Vesperino
Copy link

When using the MediaInfoWrapper class to handle media file information in my application, I encounter a significant memory leak issue. Below is a snippet of the code:

var mediaInfo = new MediaInfoWrapper(filePath, _logger);
double totalSeconds = TimeSpan.FromMilliseconds(mediaInfo.Duration).TotalSeconds;
int roundedSeconds = (int)Math.Round(totalSeconds);
I need to process 2860 media files, and I've noticed that the MediaInfoWrapper instances are not disposed of after their usage. Unfortunately, the MediaInfoWrapper class does not implement the IDisposable interface, which exacerbates the memory management issues. This oversight leads to increased memory consumption and potential application instability over time.

Could the implementation be updated to include IDisposable, or could another mechanism for proper resource management be provided?

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant