mirror of
https://github.com/stenzek/duckstation.git
synced 2026-02-04 05:04:33 +00:00
[PR #821] [MERGED] Fix D3D11 resource leaks #144
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?
📋 Pull Request Information
Original PR: https://github.com/stenzek/duckstation/pull/821
Author: @CookiePLMonster
Created: 9/4/2020
Status: ✅ Merged
Merged: 9/6/2020
Merged by: @stenzek
Base:
master← Head:d3d11-memleaks📝 Commits (1)
89e0290Fix resource leaks in AutoStagingTexture::EnsureSize and D3D11HostDisplay::DownloadTexture📊 Changes
2 files changed (+5 additions, -5 deletions)
View changed files
📝
src/common/d3d11/staging_texture.cpp(+2 -2)📝
src/frontend-common/d3d11_host_display.cpp(+3 -3)📄 Description
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
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.