Merge pull request #5410 from RoosterDragon/IDisposable

Disposable fixup
This commit is contained in:
Paul Chote
2014-06-11 10:55:44 +12:00
37 changed files with 248 additions and 260 deletions

View File

@@ -31,7 +31,8 @@ namespace OpenRA.GameRules
return;
Exists = true;
Length = (int)AudLoader.SoundLength(GlobalFileSystem.Open(Filename));
using (var s = GlobalFileSystem.Open(Filename))
Length = (int)AudLoader.SoundLength(s);
}
public void Reload()
@@ -40,7 +41,8 @@ namespace OpenRA.GameRules
return;
Exists = true;
Length = (int)AudLoader.SoundLength(GlobalFileSystem.Open(Filename));
using (var s = GlobalFileSystem.Open(Filename))
Length = (int)AudLoader.SoundLength(s);
}
}
}