-
Notifications
You must be signed in to change notification settings - Fork 665
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[tokenizers] Fixes memory leak when there is overflowing tokens (#3317)
* If you call TokenizersLibrary.LIB.getOverflowing you must also clean up all overflow encodings. If withOverflowingTokens was false no Encodings where generated leaving jni Encoding handles that would not be properly deleted. This introduces a new native method where you can inquire about number of overflow tokens without using any jni resources. And you will now only call TokenizersLibrary.LIB.getOverflowing(encoding) if withOverflowingTokens is true.
- Loading branch information
1 parent
f50900a
commit f5c9a82
Showing
3 changed files
with
16 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters