Fixed possible memoryleak in loopmanager

This commit is contained in:
DarthAffe committed 2016-06-12 11:53:01 +02:00
1 parent d520c1861e
commit ff3ebd4e08
1 file changed
+4 -1
+4 -1
View File
@@ -144,7 +144,9 @@ namespace Artemis.Managers
return;
// Fill the bitmap's background with black to avoid trailing colors on some keyboards
var fixedBmp = new Bitmap(bitmap.Width, bitmap.Height);
// Bitmaps needs to be disposd!
using (var fixedBmp = new Bitmap(bitmap.Width, bitmap.Height))
{
using (var g = Graphics.FromImage(fixedBmp))
{
g.Clear(Color.Black);
@@ -159,3 +161,4 @@ namespace Artemis.Managers
}
}
}
}