Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
When multiple calls to EnsureLocalCapacity happen over the course of a java native method call (say, in the native method itself, as well as in a function called by the native method), an earlier request for a larger local capacity will be lost/overwritten by a later request for a smaller capacity. One result is that EnsureLocalCapacity calls can be ineffective for preventing the local ref warning issued under -Xcheck:jni ("WARNING: JNI local refs: XX, exceeds capacity: YY") because the request is "forgotten" due to subsequent (sometimes tricky to spot) calls to EnsureLocalCapacity. The attached test case demonstrates the problem when run with -Xcheck:jni.
|