Took out memory garbage collection call that was significantly slowing down printing.

Added a forced memory garbage collection call after editing a table
This commit is contained in:
2016-03-02 19:52:00 +00:00
parent d874371f44
commit e9b3cd91e2
2 changed files with 1 additions and 4 deletions

View File

@@ -2622,7 +2622,6 @@ namespace Volian.Controls.Library
}
private void FindLinks()
{
//int oldRegexCacheSize = Regex.CacheSize;
string str = Text;
_LinkLocations = new List<LinkLocation>();
MatchCollection matches = Regex.Matches(str, @"<START](.*?)[[]END>", 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()
{