diff --git a/PROMS/Volian.Controls.Library/StepRTB.cs b/PROMS/Volian.Controls.Library/StepRTB.cs index 6e79c95b..f99973d3 100644 --- a/PROMS/Volian.Controls.Library/StepRTB.cs +++ b/PROMS/Volian.Controls.Library/StepRTB.cs @@ -2622,7 +2622,6 @@ namespace Volian.Controls.Library } private void FindLinks() { - //int oldRegexCacheSize = Regex.CacheSize; string str = Text; _LinkLocations = new List(); MatchCollection matches = Regex.Matches(str, @"", RegexOptions.Singleline); @@ -2637,9 +2636,6 @@ namespace Volian.Controls.Library match.Value, matchrtf.Index, matchrtf.Length, thisLink); _LinkLocations.Add(thisLink); } - //Regex.CacheSize = 0; - GC.Collect(); // there is a memory leak in Regex this fixes it. - //Regex.CacheSize = oldRegexCacheSize; } private LinkLocation FindBetweenLinks() { diff --git a/PROMS/Volian.Controls.Library/VlnFlexGrid.cs b/PROMS/Volian.Controls.Library/VlnFlexGrid.cs index d6c6f300..f0cd37b6 100644 --- a/PROMS/Volian.Controls.Library/VlnFlexGrid.cs +++ b/PROMS/Volian.Controls.Library/VlnFlexGrid.cs @@ -2421,6 +2421,7 @@ namespace Volian.Controls.Library { this.GetCellRange(e.Row, e.Col).Style.ForeColor = Color.Black; this.AdjustGridControlSize(); + GC.Collect(GC.GetGeneration(this)); // there is a memory leak in Regex this fixes it. (called in StepRTB.cs FindLinks) } // if the custom editor is visible, make it follow the cell being edited