1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2026-01-02 10:43:31 +00:00

Fixed possible memoryleak in loopmanager

This commit is contained in:
Darth Affe 2016-06-12 11:53:01 +02:00
parent eba34be67b
commit c61d0ddac3

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);
@ -158,4 +160,5 @@ namespace Artemis.Managers
}
}
}
}
}