diff --git a/osu.Game/Beatmaps/BeatmapManager.cs b/osu.Game/Beatmaps/BeatmapManager.cs
index 7aaf0ca08d..b286c054e9 100644
--- a/osu.Game/Beatmaps/BeatmapManager.cs
+++ b/osu.Game/Beatmaps/BeatmapManager.cs
@@ -34,7 +34,7 @@ namespace osu.Game.Beatmaps
///
/// Handles the storage and retrieval of Beatmaps/WorkingBeatmaps.
///
- public partial class BeatmapManager : DownloadableArchiveModelManager
+ public partial class BeatmapManager : DownloadableArchiveModelManager, IDisposable
{
///
/// Fired when a single difficulty has been hidden.
@@ -433,6 +433,11 @@ namespace osu.Game.Beatmaps
return endTime - startTime;
}
+ public void Dispose()
+ {
+ onlineLookupQueue?.Dispose();
+ }
+
///
/// A dummy WorkingBeatmap for the purpose of retrieving a beatmap for star difficulty calculation.
///
diff --git a/osu.Game/Beatmaps/BeatmapManager_BeatmapOnlineLookupQueue.cs b/osu.Game/Beatmaps/BeatmapManager_BeatmapOnlineLookupQueue.cs
index 2c79a664c5..d47d37806e 100644
--- a/osu.Game/Beatmaps/BeatmapManager_BeatmapOnlineLookupQueue.cs
+++ b/osu.Game/Beatmaps/BeatmapManager_BeatmapOnlineLookupQueue.cs
@@ -23,7 +23,7 @@ namespace osu.Game.Beatmaps
{
public partial class BeatmapManager
{
- private class BeatmapOnlineLookupQueue
+ private class BeatmapOnlineLookupQueue : IDisposable
{
private readonly IAPIProvider api;
private readonly Storage storage;
@@ -180,6 +180,11 @@ namespace osu.Game.Beatmaps
return false;
}
+ public void Dispose()
+ {
+ cacheDownloadRequest?.Dispose();
+ }
+
[Serializable]
[SuppressMessage("ReSharper", "InconsistentNaming")]
private class CachedOnlineBeatmapLookup
diff --git a/osu.Game/OsuGameBase.cs b/osu.Game/OsuGameBase.cs
index c367c3b636..453587df18 100644
--- a/osu.Game/OsuGameBase.cs
+++ b/osu.Game/OsuGameBase.cs
@@ -337,6 +337,7 @@ namespace osu.Game
{
base.Dispose(isDisposing);
RulesetStore?.Dispose();
+ BeatmapManager?.Dispose();
contextFactory.FlushConnections();
}