From 99536eaf9d7d74b6d0a3eb61734eb4dc7599d9a2 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Wed, 19 Jan 2022 08:59:42 +1100 Subject: [PATCH] dxgi: check for memory leaks in d3d12 --- host/platform/Windows/capture/DXGI/src/d3d12.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/host/platform/Windows/capture/DXGI/src/d3d12.c b/host/platform/Windows/capture/DXGI/src/d3d12.c index bb9bc626..f9bff7bc 100644 --- a/host/platform/Windows/capture/DXGI/src/d3d12.c +++ b/host/platform/Windows/capture/DXGI/src/d3d12.c @@ -328,7 +328,11 @@ static void d3d12_free(void) ID3D12CommandQueue_Release(this->commandQueue); if (this->device) - ID3D12Device_Release(this->device); + { + DWORD count = ID3D12Device_Release(this->device); + if (count != 0) + DEBUG_ERROR("ID3D12Device release is %lu, there is a memory leak!", count); + } free(this); this = NULL;