[android] Fix local reference table overflow when use callStaticStringMethod (#12621)

This commit is contained in:
timlyeee
2022-08-31 11:13:20 +08:00
committed by GitHub
parent 2123f1765a
commit 88cdfd71e3
@@ -379,6 +379,9 @@ public:
CLEAR_EXCEPTON(t.env);
ret = cc::JniHelper::jstring2string(jret);
ccDeleteLocalRef(t.env, jret);
#ifndef __OHOS__
ccDeleteLocalRef(t.env, t.classID);
#endif
deleteLocalRefs(t.env, &localRefs);
} else {
reportError(className, methodName, signature);