svn path=/trunk/mcs/; revision=21440
@@ -2,7 +2,8 @@
* FileStream.cs: (.ctor) do not set handle
in object until after it is validated via
- GetFileType so finalizer doesn't see bad handles
+ GetFileType so finalizer doesn't see bad handles and
+ initialize this.handle to InvalidHandle
2003-12-19 Bernie Solomon <[email protected]>
@@ -35,6 +35,8 @@ namespace System.IO
internal FileStream (IntPtr handle, FileAccess access, bool ownsHandle, int bufferSize, bool isAsync, bool noBuffering)
{
+ this.handle = MonoIO.InvalidHandle;
+
if (access < FileAccess.Read || access > FileAccess.ReadWrite)
throw new ArgumentOutOfRangeException ("access");