mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-06 13:02:23 -07:00
MediaInfo Dispose only when handle was created.
This commit is contained in:
parent
c9f720885e
commit
c4430ab4de
1 changed files with 8 additions and 2 deletions
|
@ -72,13 +72,19 @@ namespace NzbDrone.Core.MediaFiles.MediaInfo
|
||||||
}
|
}
|
||||||
|
|
||||||
~MediaInfo()
|
~MediaInfo()
|
||||||
|
{
|
||||||
|
if (_handle != IntPtr.Zero)
|
||||||
{
|
{
|
||||||
MediaInfo_Delete(_handle);
|
MediaInfo_Delete(_handle);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
|
{
|
||||||
|
if (_handle != IntPtr.Zero)
|
||||||
{
|
{
|
||||||
MediaInfo_Delete(_handle);
|
MediaInfo_Delete(_handle);
|
||||||
|
}
|
||||||
GC.SuppressFinalize(this);
|
GC.SuppressFinalize(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue