From 575d0e60142aaa0e0a0c6ae78eb79b5e37e6e5d2 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 15 May 2013 10:18:37 +0200 Subject: [PATCH] dxgi: Don't bother to free memory at process exit. --- dlls/dxgi/dxgi_main.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/dlls/dxgi/dxgi_main.c b/dlls/dxgi/dxgi_main.c index c9d6f2e6845..e9ed482aa56 100644 --- a/dlls/dxgi/dxgi_main.c +++ b/dlls/dxgi/dxgi_main.c @@ -44,16 +44,8 @@ static struct dxgi_main dxgi_main; static void dxgi_main_cleanup(void) { - EnterCriticalSection(&dxgi_cs); - HeapFree(GetProcessHeap(), 0, dxgi_main.device_layers); - dxgi_main.device_layers = NULL; - dxgi_main.layer_count = 0; - FreeLibrary(dxgi_main.d3d10core); - dxgi_main.d3d10core = NULL; - - LeaveCriticalSection(&dxgi_cs); DeleteCriticalSection(&dxgi_cs); } @@ -68,6 +60,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) break; case DLL_PROCESS_DETACH: + if (lpv) break; dxgi_main_cleanup(); break; } -- 2.11.4.GIT