You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Android: Fixed problems with memory leaks due to absent ReleaseStringUTFChars calls.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user