mirror of
https://github.com/osukey/osukey.git
synced 2025-06-29 23:28:00 +09:00
Dispose ResourcesSkin
before clearing skin sources
This commit is contained in:
parent
e5eea503db
commit
e8e9fdd533
@ -1,6 +1,7 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using System.Linq;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Audio;
|
using osu.Framework.Audio;
|
||||||
@ -72,6 +73,9 @@ namespace osu.Game.Skinning
|
|||||||
|
|
||||||
protected virtual void UpdateSkins()
|
protected virtual void UpdateSkins()
|
||||||
{
|
{
|
||||||
|
foreach (var resourcesSkin in SkinSources.OfType<ResourcesSkin>())
|
||||||
|
resourcesSkin.Dispose();
|
||||||
|
|
||||||
SkinSources.Clear();
|
SkinSources.Clear();
|
||||||
|
|
||||||
foreach (var skin in skinSource.AllSources)
|
foreach (var skin in skinSource.AllSources)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user