1
0
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:
Dean Herbert 2024-01-29 15:39:31 +09:00
parent 76832a1495
commit eb90ee5415
No known key found for this signature in database

View File

@ -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;
}