[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
Fri Aug 11 16:58:26 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 kornelpal at gmail.com.

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

--- shadow/79022	2006-08-11 16:42:55.000000000 -0400
+++ shadow/79022.tmp.5426	2006-08-11 16:58:26.000000000 -0400
@@ -159,6 +159,19 @@
 its buffer when it is being closed.
 
 ------- Additional Comments From vargaz at gmail.com  2006-08-11 16:42 -------
 I think the problem is that the finalizer also calls Flush, but
 either the finalizer is not called in this case, or it doesn't work.
 
+
+------- Additional Comments From kornelpal at gmail.com  2006-08-11 16:58 -------
+Finalizers are not called on termination because of performance 
+reasons. This is according to the ECMA specs. FileStream has an 
+internal buffer that is not flushed without calling either Flush, 
+Close or Finalize.
+
+Also note that I've tried this test case on MS.NET and I got the 
+same result: The stream was not flushed and data are missing at the 
+end.
+
+For example writer.Close() has to be called to ensure that the 
+stream (and the writer) is flushed.


More information about the mono-bugs mailing list