Merge pull request #2372 from martin-frbg/winexit

Do not run any cleanup if the program is exiting anyway
This commit is contained in:
Martin Kroeker 2020-01-21 14:56:45 +01:00 committed by GitHub
commit e011ad820a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -50,6 +50,9 @@ BOOL APIENTRY DllMain(HINSTANCE hInst, DWORD reason, LPVOID reserved) {
gotoblas_init();
break;
case DLL_PROCESS_DETACH:
// If the process is about to exit, don't bother releasing any resources
// The kernel is much better at bulk releasing then.
if (!reserved)
gotoblas_quit();
break;
case DLL_THREAD_ATTACH: