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:
parent
0267eb7649
commit
30f2eeda7c
@ -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
|
||||||
}
}
|
}
}
|
||||||
}
|
}
|
@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -58,5 +58,9 @@ namespace osu.Game.Beatmaps.IO
|
|||||||
{
|
{
|
||||||
return FirstMap.Metadata;
|
return FirstMap.Metadata;
|
||||||
}
|
}
|
||||||
|
public override void Dispose()
|
||||||
|
{
|
||||||
|
Archive.Dispose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user