unix/modjni: call_method: Delete done local references in loop.

To avoid local ref table overflow.
This commit is contained in:
Paul Sokolovsky 2015-09-28 08:36:43 -07:00
parent f1a9923308
commit 77020281ae
1 changed files with 4 additions and 0 deletions

View File

@ -378,12 +378,16 @@ STATIC mp_obj_t call_method(jobject obj, const char *name, jarray methods, bool
}
JJ(ReleaseStringUTFChars, name_o, decl);
JJ(DeleteLocalRef, name_o);
JJ(DeleteLocalRef, meth);
return ret;
}
}
next_method:
JJ(ReleaseStringUTFChars, name_o, decl);
JJ(DeleteLocalRef, name_o);
JJ(DeleteLocalRef, meth);
}
nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_TypeError, "method not found"));