1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 17:47:29 +08:00

Merge branch 'unload-carousel-panels' into update-framework-with-everyrthing

This commit is contained in:
Dean Herbert 2018-09-06 18:00:25 +09:00
commit 2ba7885e58
2 changed files with 11 additions and 2 deletions

View File

@ -486,6 +486,15 @@ namespace osu.Game.Screens.Select
updateItem(p, halfHeight);
}
protected override void Dispose(bool isDisposing)
{
base.Dispose(isDisposing);
// aggressively dispose "off-screen" items to reduce GC pressure.
foreach (var i in Items)
i.Dispose();
}
private CarouselBeatmapSet createCarouselSet(BeatmapSetInfo beatmapSet)
{
if (beatmapSet.Beatmaps.All(b => b.Hidden))

View File

@ -50,12 +50,12 @@ namespace osu.Game.Screens.Select.Carousel
Children = new Drawable[]
{
new DelayedLoadWrapper(
new DelayedLoadUnloadWrapper(() =>
new PanelBackground(manager.GetWorkingBeatmap(beatmapSet.Beatmaps.FirstOrDefault()))
{
RelativeSizeAxes = Axes.Both,
OnLoadComplete = d => d.FadeInFromZero(1000, Easing.OutQuint),
}, 300
}, 300, 5000
),
new FillFlowContainer
{