[Mono-bugs] [Bug 72792][Maj] Changed - mono eats memory running on SLES
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Mon, 25 Apr 2005 07:43:07 -0400 (EDT)
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 andreas.weiss@de.bp.com.
http://bugzilla.ximian.com/show_bug.cgi?id=72792
--- shadow/72792 2005-04-23 09:37:56.000000000 -0400
+++ shadow/72792.tmp.32030 2005-04-25 07:43:07.000000000 -0400
@@ -226,6 +226,31 @@
because the program stops to work after a while without a failure
notice
I tried to write small test cases but all little programs which using
only 4-5 base classes didn't produce a failure or heavy memory usage.
I'll try it further.
+
+------- Additional Comments From andreas.weiss@de.bp.com 2005-04-25 07:43 -------
+I wrote a small test case to reproduce the bug on my SLES 9 with 4 GB
+RAM. The FileInfo-class produces a memory leak after a while in a
+multithreaded application. The VS.NET project is attached. It is also
+compilable using
+# mcs -out:fileinfo.exe Class1.cs Threadclass.cs
+
+private void Filecopytoarchive(string strPathfilesource, string
+strPathfilenametarget)
+{
+ bool bolPathexists = Checkpathname(strPathfilenametarget);
+
+ if (!bolPathexists)
+ {
+System.IO.FileInfo fi = new FileInfo(strPathfilenametarget);
+string strPathname = fi.DirectoryName;
+bolPathexists = Createpath(strPathname);
+ }
+ System.IO.FileInfo fi2 = new System.IO.FileInfo
+(strPathfilesource);
+ fi2.CopyTo(strPathfilenametarget, true);
+} //Filecopytoarchive
+
+