Skip to content

Commit 7702028

Browse files
committed
unix/modjni: call_method: Delete done local references in loop.
To avoid local ref table overflow.
1 parent f1a9923 commit 7702028

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

unix/modjni.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,12 +378,16 @@ STATIC mp_obj_t call_method(jobject obj, const char *name, jarray methods, bool
378378
}
379379

380380
JJ(ReleaseStringUTFChars, name_o, decl);
381+
JJ(DeleteLocalRef, name_o);
382+
JJ(DeleteLocalRef, meth);
381383
return ret;
382384
}
383385
}
384386

385387
next_method:
386388
JJ(ReleaseStringUTFChars, name_o, decl);
389+
JJ(DeleteLocalRef, name_o);
390+
JJ(DeleteLocalRef, meth);
387391
}
388392

389393
nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_TypeError, "method not found"));

0 commit comments

Comments
 (0)