Skip to content

Commit

Permalink
Clean-up the vault leftovers
Browse files Browse the repository at this point in the history
  • Loading branch information
neon-nyan committed Feb 6, 2025
1 parent 10ce3b1 commit 3fdaefa
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions CollapseLauncher/Classes/GamePropertyVault.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,24 @@ public static void SafeDisposeVaults()
SentryHelper.ExceptionHandler(ex, SentryHelper.ExceptionType.UnhandledOther);
}
}

try
{
foreach (KeyValuePair<int, GamePresetProperty> keyValuePair in Vault)
{
GamePresetProperty value = keyValuePair.Value;
value.Dispose();
#if DEBUG
Logger.LogWriteLine($"[GamePropertyVault] Other preset property for: {value.GamePreset.GameName} - {value.GamePreset.ZoneName} has been disposed!", LogType.Debug, true);
#endif
}

Vault.Clear();
}
catch (Exception ex)
{
SentryHelper.ExceptionHandler(ex, SentryHelper.ExceptionType.UnhandledOther);
}
}
}

Expand Down

0 comments on commit 3fdaefa

Please sign in to comment.