mirror of
https://github.com/stenzek/duckstation.git
synced 2026-02-04 05:04:33 +00:00
[PR #821] Fix D3D11 resource leaks #148
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Pull Request: https://github.com/stenzek/duckstation/pull/821
State: closed
Merged: Yes
Fixes strange leaks in
AutoStagingTexture::EnsureSizeandD3D11HostDisplay::DownloadTexture. I say "strange" because in other places managed COM pointers were used, but those two were erroneously defined as naked pointers, as if the functions getting them did not increase their refcount.GetDeviceandGetResourceboth increase the refcount of the object they return, as described here:https://docs.microsoft.com/en-us/windows/win32/api/d3d11/nf-d3d11-id3d11devicechild-getdevice
https://docs.microsoft.com/en-us/windows/win32/api/d3d11/nf-d3d11-id3d11view-getresource