summaryrefslogtreecommitdiffstats
path: root/platform/android/file_access_filesystem_jandroid.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/android/file_access_filesystem_jandroid.cpp')
-rw-r--r--platform/android/file_access_filesystem_jandroid.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/platform/android/file_access_filesystem_jandroid.cpp b/platform/android/file_access_filesystem_jandroid.cpp
index 46d9728632..9b253f823c 100644
--- a/platform/android/file_access_filesystem_jandroid.cpp
+++ b/platform/android/file_access_filesystem_jandroid.cpp
@@ -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();