diff options
author | Unknown <akashl@MSRI-Akashlal.fareast.corp.microsoft.com> | 2011-05-19 12:21:41 +0530 |
---|---|---|
committer | Unknown <akashl@MSRI-Akashlal.fareast.corp.microsoft.com> | 2011-05-19 12:21:41 +0530 |
commit | 3a76682df837bf7cb391bca0061998a970c2704f (patch) | |
tree | 10dbf23da463421b4e9b7ff3b120c8cd01a67745 /Source/Core | |
parent | b665a914c81085cf3ac4e97ea3c73673cfe8ca4b (diff) |
close the file stream opened by the parser
Diffstat (limited to 'Source/Core')
-rw-r--r-- | Source/Core/BoogiePL.atg | 4 | ||||
-rw-r--r-- | Source/Core/Parser.cs | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/Source/Core/BoogiePL.atg b/Source/Core/BoogiePL.atg index b7743983..ec27422e 100644 --- a/Source/Core/BoogiePL.atg +++ b/Source/Core/BoogiePL.atg @@ -40,7 +40,9 @@ Contract.Requires(cce.NonNullElements(defines,true)); FileStream stream = new FileStream(filename, FileMode.Open, FileAccess.Read, FileShare.Read);
- return Parse(stream, filename, defines, out program);
+ var ret = Parse(stream, filename, defines, out program);
+ stream.Close();
+ return ret;
}
diff --git a/Source/Core/Parser.cs b/Source/Core/Parser.cs index 71804945..5e5dd178 100644 --- a/Source/Core/Parser.cs +++ b/Source/Core/Parser.cs @@ -59,7 +59,9 @@ Contract.Requires(cce.NonNullElements(defines,true)); FileStream stream = new FileStream(filename, FileMode.Open, FileAccess.Read, FileShare.Read);
- return Parse(stream, filename, defines, out program);
+ var ret = Parse(stream, filename, defines, out program);
+ stream.Close();
+ return ret;
}
|