From 91d57e81d9f10a2e164cd295478be41e63b33889 Mon Sep 17 00:00:00 2001 From: o3o <51990072+o-3-o@users.noreply.github.com> Date: Thu, 16 Oct 2025 11:31:24 +0800 Subject: [PATCH] Release swap chain factory after making window association --- examples/example_win32_directx11/main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/example_win32_directx11/main.cpp b/examples/example_win32_directx11/main.cpp index 16b7e2cf2..b34a5954a 100644 --- a/examples/example_win32_directx11/main.cpp +++ b/examples/example_win32_directx11/main.cpp @@ -251,6 +251,7 @@ bool CreateDeviceD3D(HWND hWnd) IDXGIFactory* pSwapChainFactory; if (SUCCEEDED(g_pSwapChain->GetParent(IID_PPV_ARGS(&pSwapChainFactory)))) pSwapChainFactory->MakeWindowAssociation(hWnd, DXGI_MWA_NO_ALT_ENTER); + pSwapChainFactory->Release(); CreateRenderTarget(); return true;