1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-13 08:32:57 +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()
{
return FirstMap.Metadata;
}
public override void Dispose()
{
// no-op
} }
}

View File

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