[Menus]: Execute cleanup earlier before shutdown (#1054)

This commit is contained in:
Edo 2023-05-22 11:27:14 +01:00 committed by GitHub
parent d1865584df
commit 02c2df9bed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 13 deletions

View File

@ -870,24 +870,24 @@ namespace Components
// Define custom menus here // Define custom menus here
Add("ui_mp/changelog.menu"); Add("ui_mp/changelog.menu");
Add("ui_mp/theater_menu.menu"); Add("ui_mp/iw4x_credits.menu");
Add("ui_mp/pc_options_multi.menu"); Add("ui_mp/menu_first_launch.menu");
Add("ui_mp/mod_download_popmenu.menu");
Add("ui_mp/pc_options_game.menu"); Add("ui_mp/pc_options_game.menu");
Add("ui_mp/pc_options_gamepad.menu"); Add("ui_mp/pc_options_gamepad.menu");
Add("ui_mp/pc_options_multi.menu");
Add("ui_mp/popup_customclan.menu");
Add("ui_mp/popup_customtitle.menu");
Add("ui_mp/popup_friends.menu");
Add("ui_mp/resetclass.menu");
Add("ui_mp/security_increase_popmenu.menu");
Add("ui_mp/startup_messages.menu");
Add("ui_mp/stats_reset.menu"); Add("ui_mp/stats_reset.menu");
Add("ui_mp/stats_unlock.menu"); Add("ui_mp/stats_unlock.menu");
Add("ui_mp/security_increase_popmenu.menu"); Add("ui_mp/theater_menu.menu");
Add("ui_mp/mod_download_popmenu.menu");
Add("ui_mp/popup_friends.menu");
Add("ui_mp/menu_first_launch.menu");
Add("ui_mp/startup_messages.menu");
Add("ui_mp/iw4x_credits.menu");
Add("ui_mp/resetclass.menu");
Add("ui_mp/popup_customtitle.menu");
Add("ui_mp/popup_customclan.menu");
} }
Menus::~Menus() void Menus::preDestroy()
{ {
// Let Windows handle the memory leaks for you! // Let Windows handle the memory leaks for you!
Menus::FreeEverything(); Menus::FreeEverything();

View File

@ -8,7 +8,8 @@ namespace Components
{ {
public: public:
Menus(); Menus();
~Menus();
void preDestroy() override;
static void FreeEverything(); static void FreeEverything();