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