1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 14:12:54 +08:00

Correctly free panels after use to avoid finalizer disposal of subtree

This commit is contained in:
Dean Herbert 2020-10-12 18:50:10 +09:00
parent c5a6f4b453
commit 0a144a1388

View File

@ -53,6 +53,12 @@ namespace osu.Game.Screens.Select.Carousel
[Resolved]
private BeatmapManager manager { get; set; }
protected override void FreeAfterUse()
{
base.FreeAfterUse();
Item = null;
}
[BackgroundDependencyLoader(true)]
private void load(BeatmapSetOverlay beatmapOverlay)
{
@ -81,6 +87,9 @@ namespace osu.Game.Screens.Select.Carousel
beatmapContainer.Clear();
beatmapSetState?.UnbindAll();
if (Item == null)
return;
Content.Children = new Drawable[]
{
new DelayedLoadUnloadWrapper(() =>