mirror of
https://gitlab.com/Mr_Goldberg/goldberg_emulator.git
synced 2025-12-16 08:58:24 +01:00
Fixed ressource leaks.
This commit is contained in:
parent
c99628a88a
commit
8757f4a548
3 changed files with 12 additions and 5 deletions
|
|
@ -138,7 +138,9 @@ void DX12_Hook::prepareForOverlay(IDXGISwapChain* pSwapChain)
|
|||
}
|
||||
if (!SUCCEEDED(pDevice->CreateCommandList(0, D3D12_COMMAND_LIST_TYPE_DIRECT, pCmdAlloc, NULL, IID_PPV_ARGS(&pCmdList))))
|
||||
{
|
||||
|
||||
pCmdAlloc->Release();
|
||||
pDescriptorHeap->Release();
|
||||
pDevice->Release();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -150,6 +152,7 @@ void DX12_Hook::prepareForOverlay(IDXGISwapChain* pSwapChain)
|
|||
pDescriptorHeap->GetCPUDescriptorHandleForHeapStart(),
|
||||
pDescriptorHeap->GetGPUDescriptorHandleForHeapStart());
|
||||
|
||||
pCmdList->Release();
|
||||
pCmdAlloc->Release();
|
||||
pDescriptorHeap->Release();
|
||||
pDevice->Release();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue