DO NOT MERGE ( Already in master ): Fix a global reference leak. # 2026571
Fix incorrect usage of Release<>ArrayElements. Code was not releasing global references. IME would have crashed in 50000 key presses.
This commit is contained in:
parent
cc7c8ea432
commit
af580087de
1 changed files with 2 additions and 2 deletions
|
@ -100,9 +100,9 @@ static int latinime_BinaryDictionary_getSuggestions(
|
|||
int count = dictionary->getSuggestions(inputCodes, arraySize, (unsigned short*) outputChars, frequencies,
|
||||
maxWordLength, maxWords, maxAlternatives);
|
||||
|
||||
env->ReleaseIntArrayElements(frequencyArray, frequencies, JNI_COMMIT);
|
||||
env->ReleaseIntArrayElements(frequencyArray, frequencies, 0);
|
||||
env->ReleaseIntArrayElements(inputArray, inputCodes, JNI_ABORT);
|
||||
env->ReleaseCharArrayElements(outputArray, outputChars, JNI_COMMIT);
|
||||
env->ReleaseCharArrayElements(outputArray, outputChars, 0);
|
||||
|
||||
return count;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue