[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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user