From 9edd98efdc9b6882368fedea9b27e17ecc338780 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 27 Jun 2019 00:29:38 +0900 Subject: [PATCH] Move disposal to end of class --- osu.Game/Online/DownloadTrackingComposite.cs | 38 ++++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/osu.Game/Online/DownloadTrackingComposite.cs b/osu.Game/Online/DownloadTrackingComposite.cs index 7003506a13..5eb2bb74bb 100644 --- a/osu.Game/Online/DownloadTrackingComposite.cs +++ b/osu.Game/Online/DownloadTrackingComposite.cs @@ -58,25 +58,6 @@ namespace osu.Game.Online manager.ItemRemoved += itemRemoved; } - #region Disposal - - protected override void Dispose(bool isDisposing) - { - base.Dispose(isDisposing); - - if (manager != null) - { - manager.DownloadBegan -= attachDownload; - manager.ItemAdded -= itemAdded; - } - - State.UnbindAll(); - - attachDownload(null); - } - - #endregion - private ArchiveDownloadRequest attachedRequest; private void attachDownload(ArchiveDownloadRequest request) @@ -130,5 +111,24 @@ namespace osu.Game.Online State.Value = state; }); + + #region Disposal + + protected override void Dispose(bool isDisposing) + { + base.Dispose(isDisposing); + + if (manager != null) + { + manager.DownloadBegan -= attachDownload; + manager.ItemAdded -= itemAdded; + } + + State.UnbindAll(); + + attachDownload(null); + } + + #endregion } }