dllhost: Periodically call CoFreeUnusedLibraries().

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Dmitry Timoshkov 2022-03-09 10:45:53 +03:00 committed by Alexandre Julliard
parent 4d011e16f6
commit eaf7261944
1 changed files with 2 additions and 1 deletions

View File

@ -352,7 +352,8 @@ int WINAPI wWinMain(HINSTANCE hinst, HINSTANCE previnst, LPWSTR cmdline, int sho
goto cleanup;
}
WaitForSingleObject(surrogate.event, INFINITE);
while (WaitForSingleObject(surrogate.event, 30000) != WAIT_OBJECT_0)
CoFreeUnusedLibraries();
}
cleanup: