[PATCH 3/6] dllhost: Periodically call CoFreeUnusedLibraries().
9 Mar
2022
9 Mar
'22
7:45 a.m.
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> --- programs/dllhost/dllhost.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/programs/dllhost/dllhost.c b/programs/dllhost/dllhost.c index 241b79d13a0..dc89c978510 100644 --- a/programs/dllhost/dllhost.c +++ b/programs/dllhost/dllhost.c @@ -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: -- 2.35.1
1381
Age (days ago)
1382
Last active (days ago)
1 comments
2 participants
participants (2)
-
Dmitry Timoshkov -
Huw Davies