mirror of
https://github.com/godotengine/godot.git
synced 2025-10-26 11:14:17 +00:00
Fix leakage of JNI object references
Fixes https://github.com/godotengine/godot/issues/87548
This commit is contained in:
parent
b8fa48be04
commit
f291a4ed3a
20 changed files with 139 additions and 32 deletions
|
|
@ -385,6 +385,14 @@ void FileAccessFilesystemJAndroid::setup(jobject p_file_access_handler) {
|
|||
_file_last_modified = env->GetMethodID(cls, "fileLastModified", "(Ljava/lang/String;)J");
|
||||
}
|
||||
|
||||
void FileAccessFilesystemJAndroid::terminate() {
|
||||
JNIEnv *env = get_jni_env();
|
||||
ERR_FAIL_NULL(env);
|
||||
|
||||
env->DeleteGlobalRef(cls);
|
||||
env->DeleteGlobalRef(file_access_handler);
|
||||
}
|
||||
|
||||
void FileAccessFilesystemJAndroid::close() {
|
||||
if (is_open()) {
|
||||
_close();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue