1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 01:53:00 +08:00

Aggressively dispose ownedBackground if it was not used, because we can

This commit is contained in:
Dean Herbert 2021-01-06 15:28:01 +09:00
parent e9d4e4d1d5
commit 550ef3f133

View File

@ -185,6 +185,7 @@ namespace osu.Game.Screens
if (background != ownedBackground)
{
// background may have not been replaced, at which point we don't want to track the background lifetime.
ownedBackground?.Dispose();
ownedBackground = null;
}