From 1c43b46b4eceb7f7a65a0f25e0b42c6f6244a0a7 Mon Sep 17 00:00:00 2001 From: Caleb Cornett Date: Sat, 5 Mar 2022 22:03:03 -0500 Subject: [PATCH] Free the actual renderer and Refresh device when destroying the device --- src/Refresh_Driver_D3D11.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Refresh_Driver_D3D11.c b/src/Refresh_Driver_D3D11.c index d4aa718..2723bf7 100644 --- a/src/Refresh_Driver_D3D11.c +++ b/src/Refresh_Driver_D3D11.c @@ -362,9 +362,13 @@ static void D3D11_DestroyDevice( IDXGIAdapter1_Release(renderer->adapter); IDXGIFactory1_Release(renderer->factory); - /* Release the DLLs */ + /* Unload the DLLs */ SDL_UnloadObject(renderer->d3d11_dll); SDL_UnloadObject(renderer->dxgi_dll); + + /* Free the renderer and Refresh Device */ + SDL_free(renderer); + SDL_free(device); } /* Drawing */