Add Handles::clear() and run it on exit

This commit is contained in:
2025-10-09 16:48:33 -06:00
parent e185629d19
commit 0c2c0f653b
7 changed files with 18 additions and 7 deletions

View File

@@ -314,8 +314,7 @@ DWORD_PTR WIN_FUNC SetThreadAffinityMask(HANDLE hThread, DWORD_PTR dwThreadAffin
[[noreturn]] void exitInternal(DWORD exitCode) {
DEBUG_LOG("exitInternal(%u)\n", exitCode);
// We have some problems cleaning up when shutting down with exit;
// temporarily use _exit to terminate without running cleanup
wibo::handles().clear();
_exit(static_cast<int>(exitCode));
}