1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-05 17:02:58 +08:00

dispose the streams

This commit is contained in:
OliBomby 2023-07-12 15:18:16 +02:00
parent 3052c317e1
commit 8ca801a224

View File

@ -432,10 +432,15 @@ namespace osu.Game.Beatmaps
if (file == null) if (file == null)
continue; continue;
var beatmapContent = new LegacyBeatmapDecoder().Decode(new LineBufferedReader(RealmFileStore.Storage.GetStream(file.File.GetStoragePath()))); using var contentStream = RealmFileStore.Storage.GetStream(file.File.GetStoragePath());
using var contentStreamReader = new LineBufferedReader(contentStream);
var beatmapContent = new LegacyBeatmapDecoder().Decode(contentStreamReader);
using var skinStream = RealmFileStore.Storage.GetStream(file.File.GetStoragePath());
using var skinStreamReader = new LineBufferedReader(contentStream);
var beatmapSkin = new LegacySkin(new SkinInfo(), null!) var beatmapSkin = new LegacySkin(new SkinInfo(), null!)
{ {
Configuration = new LegacySkinDecoder().Decode(new LineBufferedReader(RealmFileStore.Storage.GetStream(file.File.GetStoragePath()))) Configuration = new LegacySkinDecoder().Decode(skinStreamReader)
}; };
Realm.Realm.Write(realm => Realm.Realm.Write(realm =>