From ed6aeb581615499f1d48f4e1442d1b90f957f74b Mon Sep 17 00:00:00 2001 From: virusek20 Date: Sun, 26 Nov 2023 20:21:15 +0100 Subject: [PATCH] Fix CPU-readable copy of screenshot texture not being disposed (#285) --- WFInfo/Services/Screenshot/WindowsCaptureScreenshotService.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/WFInfo/Services/Screenshot/WindowsCaptureScreenshotService.cs b/WFInfo/Services/Screenshot/WindowsCaptureScreenshotService.cs index ae0d1342..1a21caec 100644 --- a/WFInfo/Services/Screenshot/WindowsCaptureScreenshotService.cs +++ b/WFInfo/Services/Screenshot/WindowsCaptureScreenshotService.cs @@ -86,6 +86,7 @@ public Task> CaptureScreenshot() else bitmap = CaptureSdr(sdrSpan, width, height, mapSource.RowPitch); _d3dDevice.ImmediateContext.UnmapSubresource(cpuTexture, 0); + cpuTexture.Dispose(); var result = new List { bitmap }; return Task.FromResult(result);