mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 19:42:55 +08:00
Add safety in ResultsScreen.Exit
to ensure HitEvents
are not holding references
This is a catch-all safety disconnecting `ScoreInfo` from `HitObject`s.
This commit is contained in:
parent
76832a1495
commit
eb90ee5415
@ -275,6 +275,11 @@ namespace osu.Game.Screens.Ranking
|
||||
if (base.OnExiting(e))
|
||||
return true;
|
||||
|
||||
// This is a stop-gap safety against components holding references to gameplay after exiting the gameplay flow.
|
||||
// Right now, HitEvents are only used up to the results screen. If this changes in the future we need to remove
|
||||
// HitObject references from HitEvent.
|
||||
Score.HitEvents.Clear();
|
||||
|
||||
this.FadeOut(100);
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user