Branko Čibej <br...@apache.org> writes: > On 06.07.2017 23:11, Philip Martin wrote: >> // Create a local frame for our references >> - env->PushLocalFrame(LOCAL_FRAME_SIZE); >> + env->PushLocalFrame(LOCAL_FRAME_SIZE + 100); > > Mmph ... it kinda hurts to see how limited the JNI API is in this > respect. We could either increase the LOCAL_FRAME_SIZE variable, or > create a new frame within each iteration of the loop.
We might be able to fix the unparseExternals case by passing an env into the functor, then we would be creating fewer refs. putErrorsInTrace is harder because it is recursive and stores a ref at each level. Would pushing/poping frames invalidate those refs? Perhaps converting the recursion to iteration might be the best solution. -- Philip