mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-20 23:52:40 +08:00
* Sync PR: cocos2d-x #18299: JNI ERROR (app bug): local reference table overflow (max=512) * Fixes potential memory leak if can't find class by jsb.reflection.callStaticMethod.
This commit is contained in:
@@ -387,6 +387,7 @@ bool JavaScriptJavaBridge::CallInfo::getMethodInfo()
|
||||
|
||||
if (NULL == m_classID) {
|
||||
SE_LOGD("Classloader failed to find class of %s", m_className.c_str());
|
||||
m_env->DeleteLocalRef(_jstrClassName);
|
||||
m_env->ExceptionClear();
|
||||
m_error = JSJ_ERR_CLASS_NOT_FOUND;
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user