From f7099eb68f9fd36568bdf475101f167b9de08e32 Mon Sep 17 00:00:00 2001 From: Philippe Symons Date: Tue, 3 Mar 2026 00:46:36 +0100 Subject: [PATCH] Slightly better cleanup of Select_Menu --- source/script_array.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/script_array.cpp b/source/script_array.cpp index c864e0f..aad1827 100644 --- a/source/script_array.cpp +++ b/source/script_array.cpp @@ -853,6 +853,9 @@ bool run_conditional(int index) case CMD_LANG_MENU: populate_lang_menu(); lang = langs.select_menu_main(); + // We have our choice, we should release + // the memory of the options since we won't need them anymore + langs.clear_options(); if (lang == BUTTON_CANCEL) { return false; @@ -863,6 +866,9 @@ bool run_conditional(int index) case CMD_GAME_MENU: populate_game_menu(party_data.get_lang()); game = games.select_menu_main(); + // We have our choice, we should release + // the memory of the options since we won't need them anymore + games.clear_options(); if (game == BUTTON_CANCEL) { return false;