1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 20:22:55 +08:00

Dispose config managers ahead of time to avoid database errors

This commit is contained in:
Dean Herbert 2019-09-06 00:22:35 +09:00
parent 9d0151f19f
commit dafe9da851

View File

@ -36,5 +36,13 @@ namespace osu.Game.Rulesets
return configCache.GetOrAdd(ruleset.RulesetInfo.ID.Value, _ => ruleset.CreateConfig(settingsStore));
}
protected override void Dispose(bool isDisposing)
{
base.Dispose(isDisposing);
foreach (var c in configCache.Values)
(c as IDisposable)?.Dispose();
}
}
}