[Mono-bugs] [Bug 79022][Nor] Changed - StreamWriter aborts writing with the regular end of program

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Aug 9 15:23:06 EDT 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 vargaz at gmail.com.

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

--- shadow/79022	2006-08-08 15:34:20.000000000 -0400
+++ shadow/79022.tmp.28127	2006-08-09 15:23:06.000000000 -0400
@@ -136,6 +136,20 @@
 Created an attachment (id=17421)
 This provides the ObjectList
 
 
 ------- Additional Comments From gampps at gmx.de  2006-08-08 15:34 -------
 Flush() and Close() both solve my problem...
+
+------- Additional Comments From vargaz at gmail.com  2006-08-09 15:23 -------
+I think the problem is the finalization does not flush the stream, or
+it does, but it doesn't work because some other object the stream is
+depending in is already finalized.
+
+To avoid depending on stuff such as this, always call close, or
+better yet, enclose it with an 'using' statement to have it
+automatically closed:
+
+http://www.codeproject.com/csharp/TinguUsingStatement.asp
+
+
+


More information about the mono-bugs mailing list