Revision: 223
http://acmcontester.svn.sourceforge.net/acmcontester/?rev=223&view=rev
Author: brus07
Date: 2008-06-06 14:38:47 -0700 (Fri, 06 Jun 2008)
Log Message:
-----------
Added destructor for close stream.
Modified Paths:
--------------
ACMServer/trunk/TesterSolution/Library/LibraryExtention/Log.cs
Modified: ACMServer/trunk/TesterSolution/Library/LibraryExtention/Log.cs
===================================================================
--- ACMServer/trunk/TesterSolution/Library/LibraryExtention/Log.cs 2008-06-06 08:50:12 UTC (rev 222)
+++ ACMServer/trunk/TesterSolution/Library/LibraryExtention/Log.cs 2008-06-06 21:38:47 UTC (rev 223)
@@ -96,8 +96,19 @@
//TODO:
throw new Exception("WriterNullException");
}
- writer.WriteLine(message);
+ lock (writer)
+ {
+ writer.WriteLine(message);
+ writer.Flush();
+ }
}
}
+ ~Log()
+ {
+ if (writer != null)
+ {
+ writer.Close();
+ }
+ }
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|