summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2018-08-29 12:49:07 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2018-08-31 09:42:16 -0700
commit0dac3bc60c549c46f341984439d6fd007fe2ffe6 (patch)
treea4ef1203cbca3b37e01f78eada4069d18b79b70f /platform
parent5c8ad4de473e7c040d3812aa0c345a83a51cae2b (diff)
downloadqtlocation-mapboxgl-0dac3bc60c549c46f341984439d6fd007fe2ffe6.tar.gz
[android] Explicitly delete local JNI references
This method seems to be called in a loop, leading to a local reference table overflow if not explicitly deleted. See https://github.com/mapbox/mapbox-gl-native/pull/12716#pullrequestreview-150462731
Diffstat (limited to 'platform')
-rw-r--r--platform/android/src/logger.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/platform/android/src/logger.cpp b/platform/android/src/logger.cpp
index 1cc7660716..0ade914604 100644
--- a/platform/android/src/logger.cpp
+++ b/platform/android/src/logger.cpp
@@ -28,6 +28,9 @@ void Logger::log(jni::JNIEnv& env, EventSeverity severity, const std::string &ms
auto static error = _class.GetStaticMethod<Signature>(env, "e");
_class.Call(env, error, tag, message);
}
+
+ DeleteLocalRef(env, tag);
+ DeleteLocalRef(env, message);
}
} // namespace android