Fixed possible memoryleak in loopmanager

This commit is contained in:
DarthAffe committed 2016-06-12 11:53:01 +02:00
1 parent eba34be67b
commit c61d0ddac3
1 file changed
+4 -1
+4 -1
View File
@@ -144,7 +144,9 @@ namespace Artemis.Managers
return; return;
// Fill the bitmap's background with black to avoid trailing colors on some keyboards // 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)) using (var g = Graphics.FromImage(fixedBmp))
{ {
g.Clear(Color.Black); g.Clear(Color.Black);
@@ -158,4 +160,5 @@ namespace Artemis.Managers
} }
} }
} }
}
} }