mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-23 13:14:59 +00:00
optimize: collect garbage after SetGrammar to avoid memory leak
This commit is contained in:
parent
340fe9e3ba
commit
8fc25e312d
3 changed files with 6 additions and 4 deletions
|
@ -317,8 +317,8 @@ namespace SourceGit.Views
|
|||
builder.AppendLine(line.Content);
|
||||
}
|
||||
|
||||
Models.TextMateHelper.SetGrammarByFileName(_textMate, DiffData.File);
|
||||
Text = builder.ToString();
|
||||
Models.TextMateHelper.SetGrammarByFileName(_textMate, DiffData.File);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -675,8 +675,8 @@ namespace SourceGit.Views
|
|||
}
|
||||
}
|
||||
|
||||
Models.TextMateHelper.SetGrammarByFileName(_textMate, DiffData.File);
|
||||
Text = builder.ToString();
|
||||
Models.TextMateHelper.SetGrammarByFileName(_textMate, DiffData.File);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue