1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-06 08:22:56 +08:00

Implement IDisposable in ArchiveReaders

This commit is contained in:
Drew DeVault 2016-10-10 09:26:34 -04:00 committed by Dean Herbert
parent 0267eb7649
commit 30f2eeda7c
3 changed files with 13 additions and 2 deletions

View File

@ -48,5 +48,10 @@ namespace osu.Desktop.Beatmaps.IO
public override BeatmapMetadata ReadMetadata() public override BeatmapMetadata ReadMetadata()
{ {
return FirstMap.Metadata; return FirstMap.Metadata;
}
public override void Dispose()
{
// no-op
} } } }
} }

View File

@ -5,7 +5,7 @@ using osu.Framework.Platform;
namespace osu.Game.Beatmaps.IO namespace osu.Game.Beatmaps.IO
{ {
public abstract class ArchiveReader public abstract class ArchiveReader : IDisposable
{ {
private class Reader private class Reader
{ {
@ -41,6 +41,8 @@ namespace osu.Game.Beatmaps.IO
/// <summary> /// <summary>
/// Opens a stream for reading a specific file from this archive. /// Opens a stream for reading a specific file from this archive.
/// </summary> /// </summary>
public abstract Stream ReadFile(string name); public abstract Stream ReadFile(string name);
public abstract void Dispose();
} }
} }

View File

@ -58,5 +58,9 @@ namespace osu.Game.Beatmaps.IO
{ {
return FirstMap.Metadata; return FirstMap.Metadata;
} }
public override void Dispose()
{
Archive.Dispose();
}
} }
} }