[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:
John Firebaugh
2018-08-29 12:49:07 -07:00
parent 5c8ad4de47
commit 0dac3bc60c

View File

@@ -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