envoyproxy / envoyproxy/envoy-mobile
jni: call `ReleaseStringUTFChars` where appropriate
Open
bug
no stalebot
platform/android
- Dominant language
- Java
- Stars
- 566
- Forks
- 85
- PR merge metrics
- No merged PRs in 30d
Description
According to [this resource](http://journals.ecs.soton.ac.uk/java/tutorial/native1.1/implementing/string.html):
> Note that when your native code is finished using the UTF-8 string, it must call ReleaseStringUTFChars. ReleaseStringUTFChars informs the VM that the native method is finished with the string, so that the memory taken by the UTF-8 string can then be freed. Failing to call ReleaseStringUTFChars results in a memory leak. This will ultimately lead to system memory exhaustion.
Unfortunately, there are many places in jni_interface.cc where this does not happen.
Contributor guide
Assessment
This issue has not been assessed yet.