Skip to content

Commit

Permalink
[de] Fix memory leak in spellcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
KirillovIlya committed Aug 30, 2023
1 parent a344df4 commit 743534d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions word/Editor/SpellChecker/ParagraphSpellChecker.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@
"usrLang" : arrLangs
});
}
else
{
this.private_ClearMarksForCorrectWords();
}

return (arrWords.length || isFirst);
};
Expand Down Expand Up @@ -494,9 +498,9 @@
}
}

this.private_ClearMarksForRightWords();
this.private_ClearMarksForCorrectWords();
};
CParagraphSpellChecker.prototype.private_ClearMarksForRightWords = function()
CParagraphSpellChecker.prototype.private_ClearMarksForCorrectWords = function()
{
for (let nCount = this.Elements.length, nIndex = nCount - 1; nIndex >= 0; --nIndex)
{
Expand Down

0 comments on commit 743534d

Please sign in to comment.