mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 19:36:28 +00:00
Fixed possible memoryleak in loopmanager
This commit is contained in:
1 parent
d520c1861e
commit
ff3ebd4e08
1 file changed
+4
-1
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user