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 cc7acffdad..b66a201a12 100644
--- a/platform/android/file_access_filesystem_jandroid.cpp
+++ b/platform/android/file_access_filesystem_jandroid.cpp
@@ -408,6 +408,14 @@ void FileAccessFilesystemJAndroid::setup(jobject p_file_access_handler) {
_file_resize = env->GetMethodID(cls, "fileResize", "(IJ)I");
}
+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();