winrt: Wait for main thread to exit before exit.

This will allow application main to go out of scope and free objects
allocated there.

Change-Id: I7b7199ecf67afe578bac043f16b064c9daaae04a
Task-Id: QTBUG-48760
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
bb10
Samuel Nevala 2015-10-15 13:16:43 +03:00
parent 09d9af59f0
commit 49640d417f
1 changed files with 1 additions and 0 deletions

View File

@ -169,6 +169,7 @@ public:
}).Get());
Q_ASSERT_SUCCEEDED(hr);
WaitForSingleObjectEx(mainThread, INFINITE, FALSE);
DWORD exitCode;
GetExitCodeThread(mainThread, &exitCode);
return exitCode;