win32: Don't run cleanup if we're about to exit anyway
If the process is about to exit, there's no point trying to do a bunch of work to clean up resources. The kernel will release them much more efficiently when the process exits at the end of this function.
This commit is contained in:
parent
c45b7aef14
commit
b16fa2e711
|
@ -50,7 +50,10 @@ BOOL APIENTRY DllMain(HINSTANCE hInst, DWORD reason, LPVOID reserved) {
|
|||
gotoblas_init();
|
||||
break;
|
||||
case DLL_PROCESS_DETACH:
|
||||
gotoblas_quit();
|
||||
// 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:
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue