Skip to content

Commit

Permalink
Fix CPU-readable copy of screenshot texture not being disposed (#285)
Browse files Browse the repository at this point in the history
  • Loading branch information
virusek20 authored Nov 26, 2023
1 parent 215d51d commit ed6aeb5
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ public Task<List<Bitmap>> CaptureScreenshot()
else bitmap = CaptureSdr(sdrSpan, width, height, mapSource.RowPitch);

_d3dDevice.ImmediateContext.UnmapSubresource(cpuTexture, 0);
cpuTexture.Dispose();

var result = new List<Bitmap> { bitmap };
return Task.FromResult(result);
Expand Down

0 comments on commit ed6aeb5

Please sign in to comment.