attempt to improve gc behavior

This commit is contained in:
XtraCube committed 2026-07-20 20:23:38 -04:00
1 parent 0a0ad74419
commit 1b40b1c5e4
1 file changed
+4 -2
@@ -419,6 +419,8 @@ internal static class GameSettingMenuPatches
_customTwoButton!.transform.localPosition = _customTwoBtnOgPos;
menu.RoleSettingsButton.transform.localPosition = _roleBtnOgPos;
CleanupTab(settings, roles);
if (SelectedModIdx != 0)
{
_customOneButton.buttonText.text = SelectedMod!.MiraPlugin.CustomOptionMenuNameOne;
@@ -560,8 +562,6 @@ internal static class GameSettingMenuPatches
{
menu.ChangeTab(0, false);
}
CleanupTab(settings, roles);
}
private static void ClearOptions(Il2CppSystem.Collections.Generic.List<OptionBehaviour> options)
@@ -606,6 +606,8 @@ internal static class GameSettingMenuPatches
CleanupSettings(_customTwoTab, MenuCategory.CustomTwo);
}
Utilities.Extensions.ClearGarbageCollector();
void CleanupRoleSettings(RolesSettingsMenu rolesMenu)
{
if (rolesMenu.advancedSettingChildren != null)