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:
parent
c5a6f4b453
commit
0a144a1388
@ -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(() =>
|
||||
|
Loading…
Reference in New Issue
Block a user