From 1073f0b4238e8c6008a2b7e7e63e71b1335f29b2 Mon Sep 17 00:00:00 2001 From: Ivan Ponomarev Date: Tue, 26 Feb 2019 23:54:45 +0300 Subject: Android: Fixed problems with memory leaks due to absent ReleaseStringUTFChars calls. --- platform/android/dir_access_jandroid.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'platform/android/dir_access_jandroid.cpp') 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; } -- cgit v1.2.3