From f5988de0d1b3f15cdab2b686cc8e7831ddfcafca Mon Sep 17 00:00:00 2001 From: o3o <51990072+o-3-o@users.noreply.github.com> Date: Thu, 16 Oct 2025 11:30:59 +0800 Subject: [PATCH] Release IDXGIFactory after making window association --- examples/example_sdl2_directx11/main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/example_sdl2_directx11/main.cpp b/examples/example_sdl2_directx11/main.cpp index bbabf55c0..7a1ab9ec3 100644 --- a/examples/example_sdl2_directx11/main.cpp +++ b/examples/example_sdl2_directx11/main.cpp @@ -262,6 +262,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;