[Mono-bugs] [Bug 62293][Maj] New - memory leak in Regex.Match when using Mono on Windows

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 2 Aug 2004 14:58:53 -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 ralinx@gmail.com.

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

--- shadow/62293	2004-08-02 14:58:53.000000000 -0400
+++ shadow/62293.tmp.28327	2004-08-02 14:58:53.000000000 -0400
@@ -0,0 +1,70 @@
+Bug#: 62293
+Product: Mono: Class Libraries
+Version: unspecified
+OS: Windows XP
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: System
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: ralinx@gmail.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: memory leak in Regex.Match when using Mono on Windows
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+
+whenever i run Regex.Match in Mono on Windows, the mono process will
+increase it's memory usage.  In an application that uses regular
+expressions a lot, this bug makes the application virtually unusable 
+
+
+Steps to reproduce the problem:
+1. run the following code in Mono on Windows and you can see the memory
+usage going up in the task manager (it will keep going up as long as the
+program runs)
+
+using System;
+using System.Text;
+using System.Text.RegularExpressions;
+using System.Threading;
+
+class MainClass
+{
+      public static void Main(string[] args)
+      {
+              Match match;
+              string strPattern = @"\w \w \w \w \w: \d";
+
+              for (long i=0;i<50000;i++)
+              {
+                      string strTest = "This is a simple test: " +
+i.ToString() ;
+                      match = Regex.Match(strTest,strPattern);
+                      Console.WriteLine(i);
+                      Thread.Sleep(10);
+              }
+      }
+}
+
+
+Actual Results:
+
+memory usage keeps going up while it shouldn't
+
+Expected Results:
+
+sane memory usage
+
+How often does this happen? 
+
+every time (on windows)
+
+
+Additional Information: