mirror of https://github.com/ppy/osu
Dispose config managers ahead of time to avoid database errors
This commit is contained in:
parent
9d0151f19f
commit
dafe9da851
|
@ -36,5 +36,13 @@ public IRulesetConfigManager GetConfigFor(Ruleset ruleset)
|
|||
|
||||
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