Merge pull request #31 from DarthAffe/MemoryLeak

Fixed a memory leak after disposing the DX11ScreenCapture
This commit is contained in:
DarthAffe 2024-02-19 21:36:08 +01:00 committed by GitHub
commit aa643f1fe3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -438,8 +438,14 @@ public sealed class DX11ScreenCapture : AbstractScreenCapture<ColorBGRA>
base.Dispose(disposing);
lock (_captureLock)
{
foreach (ZoneTextures textures in _textures.Values)
textures.Dispose();
_textures.Clear();
DisposeDX();
}
}
private void DisposeDX()
{