summaryrefslogtreecommitdiff
path: root/platform/android/dir_access_jandroid.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-02-27 14:08:42 +0100
committerGitHub <noreply@github.com>2019-02-27 14:08:42 +0100
commit36de6c1e3c08a30a7579148ee5d2f8ed8021de42 (patch)
tree2999e30b428a6f7adb063d9cb5bc7f5dc312b312 /platform/android/dir_access_jandroid.cpp
parentf1e3bb0a159636c6c42701da9ed843d859fcbf2a (diff)
parent1073f0b4238e8c6008a2b7e7e63e71b1335f29b2 (diff)
Merge pull request #26328 from ivanarh/master
Android: Fixed problems with memory leaks due to absent ReleaseStringUTFChars calls.
Diffstat (limited to 'platform/android/dir_access_jandroid.cpp')
-rw-r--r--platform/android/dir_access_jandroid.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/platform/android/dir_access_jandroid.cpp b/platform/android/dir_access_jandroid.cpp
index 4b3d93aaa7..8c464465ca 100644
--- a/platform/android/dir_access_jandroid.cpp
+++ b/platform/android/dir_access_jandroid.cpp
@@ -31,6 +31,7 @@
#include "dir_access_jandroid.h"
#include "core/print_string.h"
#include "file_access_jandroid.h"
+#include "string_android.h"
#include "thread_jandroid.h"
jobject DirAccessJAndroid::io = NULL;
@@ -69,7 +70,7 @@ String DirAccessJAndroid::get_next() {
if (!str)
return "";
- String ret = String::utf8(env->GetStringUTFChars((jstring)str, NULL));
+ String ret = jstring_to_string((jstring)str, env);
env->DeleteLocalRef((jobject)str);
return ret;
}