mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Close files, GC can take too long and the OS will trash us.
This commit is contained in:
@@ -102,6 +102,7 @@ namespace DiscImageChef.ImagePlugins
|
||||
{
|
||||
FileStream stream = new FileStream(imagePath, FileMode.Open, FileAccess.Read);
|
||||
stream.Seek(0, SeekOrigin.Begin);
|
||||
stream.Close();
|
||||
|
||||
FileInfo fi = new FileInfo(imagePath);
|
||||
string extension = Path.GetExtension(imagePath).ToLower();
|
||||
@@ -294,6 +295,8 @@ namespace DiscImageChef.ImagePlugins
|
||||
|
||||
stream.Read(buffer, 0, (int)(length * sectorSize));
|
||||
|
||||
stream.Close();
|
||||
|
||||
return buffer;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user