mirror of
https://github.com/ppy/osu
synced 2025-01-05 05:39:49 +00:00
Clean up HitEvents after use to avoid near-permanent memory retention
This commit is contained in:
parent
d8b92cc585
commit
2bb0283a68
@ -252,6 +252,12 @@ namespace osu.Game.Rulesets.Scoring
|
||||
HighestCombo.Value = 0;
|
||||
}
|
||||
|
||||
protected override void Dispose(bool isDisposing)
|
||||
{
|
||||
base.Dispose(isDisposing);
|
||||
hitEvents.Clear();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieve a score populated with data for the current play this processor is responsible for.
|
||||
/// </summary>
|
||||
@ -269,7 +275,7 @@ namespace osu.Game.Rulesets.Scoring
|
||||
foreach (var result in Enum.GetValues(typeof(HitResult)).OfType<HitResult>().Where(r => r > HitResult.None && hitWindows.IsHitResultAllowed(r)))
|
||||
score.Statistics[result] = GetStatistic(result);
|
||||
|
||||
score.HitEvents = new List<HitEvent>(hitEvents);
|
||||
score.HitEvents = hitEvents;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
Loading…
Reference in New Issue
Block a user