[Mono-bugs] [Bug 79974][Nor] New - [PATCH] MemoryStream.Close() dose not call is base method

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sun Nov 19 03:27:00 EST 2006


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by redforks at gmail.com.

http://bugzilla.ximian.com/show_bug.cgi?id=79974

--- shadow/79974	2006-11-19 03:27:00.000000000 -0500
+++ shadow/79974.tmp.4680	2006-11-19 03:27:00.000000000 -0500
@@ -0,0 +1,38 @@
+Bug#: 79974
+Product: Mono: Class Libraries
+Version: 1.2
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: CORLIB
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: redforks at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: [PATCH] MemoryStream.Close() dose not call is base method
+
+MemoryStream.Close() dose not call is base method
+
+I have a class derived from MemoryStream, and I override the Dispose(bool)
+method. When I run under MONO, I found that the Dispose(bool) is not called.
+
+Index: corlib/System.IO/MemoryStream.cs
+===================================================================
+--- corlib/System.IO/MemoryStream.cs    (revision 68052)
++++ corlib/System.IO/MemoryStream.cs    (working copy)
+@@ -214,6 +214,7 @@
+
+                public override void Close ()
+                {
++                       base.Close();
+                        streamClosed = true;
+                        expandable = false;
+                }
+
+Note: base.Close() must be called before streamClosed = true. because only
+after base.Close(), MemoryStream is really be closed.


More information about the mono-bugs mailing list