Fixed: Memory leak due to unmanaged Bitmaps leaking.

This commit is contained in:
Leonardo Galli
2018-12-02 17:59:15 +01:00
parent 77950645af
commit d38562664d
7 changed files with 11 additions and 47 deletions
@@ -123,27 +123,6 @@ namespace NzbDrone.Common.Disk
}
}
public bool IsValidGDIPlusImage(string filename)
{
if (!CanUseGDIPlus())
{
return true;
}
try
{
using (var bmp = new Bitmap(filename))
{
}
return true;
}
catch (Exception ex)
{
Logger.Debug(ex, "Corrupted image found at: {0}.", filename);
return false;
}
}
public bool FolderWritable(string path)
{
Ensure.That(path, () => path).IsValidPath();