Skip to content

Commit

Permalink
COM cleanup is not needed and can hang the exit
Browse files Browse the repository at this point in the history
  • Loading branch information
walbourn committed Dec 11, 2024
1 parent 5727466 commit 192c130
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 8 deletions.
2 changes: 0 additions & 2 deletions d3d11game_win32/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance,

g_game.reset();

CoUninitialize();

return static_cast<int>(msg.wParam);
}

Expand Down
2 changes: 0 additions & 2 deletions d3d11game_win32_dr/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance,

g_game.reset();

CoUninitialize();

return static_cast<int>(msg.wParam);
}

Expand Down
3 changes: 1 addition & 2 deletions d3d12game_win32/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance,
if (FAILED(CoInitializeEx(nullptr, COINITBASE_MULTITHREADED)))
return 1;
#else
Microsoft::WRL::Wrappers::RoInitializeWrapper initialize(RO_INIT_MULTITHREADED);
if (FAILED(initialize))
if (FAILED(RoInitialize(COINITBASE_MULTITHREADED)))
return 1;
#endif

Expand Down
3 changes: 1 addition & 2 deletions d3d12game_win32_dr/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance,
if (FAILED(CoInitializeEx(nullptr, COINITBASE_MULTITHREADED)))
return 1;
#else
Microsoft::WRL::Wrappers::RoInitializeWrapper initialize(RO_INIT_MULTITHREADED);
if (FAILED(initialize))
if (FAILED(RoInitialize(COINITBASE_MULTITHREADED)))
return 1;
#endif

Expand Down

0 comments on commit 192c130

Please sign in to comment.