dxgi: Don't bother to free memory at process exit.

This commit is contained in:
Alexandre Julliard 2013-05-15 10:18:37 +02:00
parent 14f7900b8d
commit 575d0e6014
1 changed files with 1 additions and 8 deletions

View File

@ -44,16 +44,8 @@ static struct dxgi_main dxgi_main;
static void dxgi_main_cleanup(void) static void dxgi_main_cleanup(void)
{ {
EnterCriticalSection(&dxgi_cs);
HeapFree(GetProcessHeap(), 0, dxgi_main.device_layers); HeapFree(GetProcessHeap(), 0, dxgi_main.device_layers);
dxgi_main.device_layers = NULL;
dxgi_main.layer_count = 0;
FreeLibrary(dxgi_main.d3d10core); FreeLibrary(dxgi_main.d3d10core);
dxgi_main.d3d10core = NULL;
LeaveCriticalSection(&dxgi_cs);
DeleteCriticalSection(&dxgi_cs); DeleteCriticalSection(&dxgi_cs);
} }
@ -68,6 +60,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
break; break;
case DLL_PROCESS_DETACH: case DLL_PROCESS_DETACH:
if (lpv) break;
dxgi_main_cleanup(); dxgi_main_cleanup();
break; break;
} }