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:
parent
9d0151f19f
commit
dafe9da851
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user