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:
parent
eba34be67b
commit
c61d0ddac3
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user