mirror of
https://github.com/DarthAffe/ScreenCapture.NET.git
synced 2026-11-11 11:26:31 +00:00
Merge pull request #31 from DarthAffe/MemoryLeak
Fixed a memory leak after disposing the DX11ScreenCapture
This commit is contained in:
1 file changed
+6
@@ -438,8 +438,14 @@ public sealed class DX11ScreenCapture : AbstractScreenCapture<ColorBGRA>
|
|||||||
base.Dispose(disposing);
|
base.Dispose(disposing);
|
||||||
|
|
||||||
lock (_captureLock)
|
lock (_captureLock)
|
||||||
|
{
|
||||||
|
foreach (ZoneTextures textures in _textures.Values)
|
||||||
|
textures.Dispose();
|
||||||
|
_textures.Clear();
|
||||||
|
|
||||||
DisposeDX();
|
DisposeDX();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void DisposeDX()
|
private void DisposeDX()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user