[PATCH v3 7/8] dllhost: Periodically call CoFreeUnusedLibraries().
24 Feb
2022
24 Feb
'22
8:50 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 56722f0a647..39726b63c60 100644 --- a/programs/dllhost/dllhost.c +++ b/programs/dllhost/dllhost.c @@ -358,7 +358,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
1391
Age (days ago)
1391
Last active (days ago)
0 comments
1 participants
participants (1)
-
Dmitry Timoshkov