1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 01:02:55 +08:00

Move disposal to end of class

This commit is contained in:
Dean Herbert 2019-06-27 00:29:38 +09:00
parent 768d6c2fb3
commit 9edd98efdc

View File

@ -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<TModel> attachedRequest;
private void attachDownload(ArchiveDownloadRequest<TModel> 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
}
}