Fix leakage of JNI object references

Fixes https://github.com/godotengine/godot/issues/87548
This commit is contained in:
Fredia Huya-Kouadio 2024-04-15 10:30:18 -07:00
parent b8fa48be04
commit f291a4ed3a
20 changed files with 139 additions and 32 deletions

View file

@ -95,6 +95,7 @@ void GodotJavaViewWrapper::configure_pointer_icon(int pointer_type, const String
jstring jImagePath = env->NewStringUTF(image_path.utf8().get_data());
env->CallVoidMethod(_godot_view, _configure_pointer_icon, pointer_type, jImagePath, p_hotspot.x, p_hotspot.y);
env->DeleteLocalRef(jImagePath);
}
}