1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-13 14:13:18 +08:00

Unbind events on disposal

This commit is contained in:
Dean Herbert 2020-09-28 17:41:10 +09:00
parent 8692c24dfc
commit e60e47ff66
3 changed files with 18 additions and 0 deletions

View File

@ -184,5 +184,11 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
return true;
}
}
protected override void Dispose(bool isDisposing)
{
base.Dispose(isDisposing);
drawableSpinner.ApplyCustomUpdateState -= updateStateTransforms;
}
}
}

View File

@ -94,5 +94,11 @@ namespace osu.Game.Rulesets.Osu.Skinning
Scale = new Vector2(final_scale * (0.8f + (float)Interpolation.ApplyEasing(Easing.Out, drawableSpinner.Progress) * 0.2f));
}
protected override void Dispose(bool isDisposing)
{
base.Dispose(isDisposing);
drawableSpinner.ApplyCustomUpdateState -= updateStateTransforms;
}
}
}

View File

@ -126,5 +126,11 @@ namespace osu.Game.Rulesets.Osu.Skinning
return (float)barCount / total_bars * final_metre_height;
}
protected override void Dispose(bool isDisposing)
{
base.Dispose(isDisposing);
drawableSpinner.ApplyCustomUpdateState -= updateStateTransforms;
}
}
}