Dispose of Streams when used

This commit is contained in:
Naxesss
2021-10-12 00:13:38 +02:00
parent 01d77fb741
commit 47b4d03145
5 changed files with 10 additions and 6 deletions

View File

@ -50,8 +50,12 @@ namespace osu.Game.Rulesets.Edit.Checks
continue;
}
Stream data = context.WorkingBeatmap.GetStream(storagePath);
StreamFileAbstraction fileAbstraction = new StreamFileAbstraction(filename, data);
StreamFileAbstraction fileAbstraction;
using (Stream data = context.WorkingBeatmap.GetStream(storagePath))
{
fileAbstraction = new StreamFileAbstraction(filename, data);
}
// We use TagLib here for platform invariance; BASS cannot detect audio presence on Linux.
TagLib.File tagFile = null;