Fixed IDisposable implementation and usage.
- Implement IDisposable interface correctly, with sealed classes where possible for simplicity. - Add using statement around undisposed local variables.
This commit is contained in:
@@ -93,8 +93,9 @@ namespace OpenRA
|
||||
List<string> extracted = new List<string>();
|
||||
try
|
||||
{
|
||||
var z = new ZipInputStream(File.OpenRead(zipFile));
|
||||
z.ExtractZip(dest, extracted, s => onProgress("Extracting " + s));
|
||||
using (var stream = File.OpenRead(zipFile))
|
||||
using (var z = new ZipInputStream(stream))
|
||||
z.ExtractZip(dest, extracted, s => onProgress("Extracting " + s));
|
||||
}
|
||||
catch (SharpZipBaseException)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user