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:
parent
768d6c2fb3
commit
9edd98efdc
@ -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
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user