From 1edbdd8a35d0f2bde31d347efde226ef6353fac2 Mon Sep 17 00:00:00 2001 From: Nemirtingas Date: Tue, 15 Oct 2019 15:01:25 +0200 Subject: [PATCH] Free DX12 devices on destroy --- overlay_experimental/windows/DX12_Hook.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/overlay_experimental/windows/DX12_Hook.cpp b/overlay_experimental/windows/DX12_Hook.cpp index fb95008..e798a1e 100644 --- a/overlay_experimental/windows/DX12_Hook.cpp +++ b/overlay_experimental/windows/DX12_Hook.cpp @@ -247,6 +247,13 @@ DX12_Hook::~DX12_Hook() if (initialized) { + pSrvDescHeap->Release(); + for (UINT i = 0; i < bufferCount; ++i) + pCmdAlloc[i]->Release(); + pRtvDescHeap->Release(); + delete[]pMainRenderTargets; + delete[]pCmdAlloc; + ImGui_ImplDX12_InvalidateDeviceObjects(); ImGui::DestroyContext();