Sunday 15 January 2012

cordova - Delete JNI local references in android app -


Hi, in my Android phonegap app, I have used the following link and said the original code. Two numbers have been added using that native code. Using

How can I remove genuine local references?

Here's the link:

I'm getting this error in the lockback:

  JNI error overrhel local reference table 512 entries VM aborted   

To resolve this error, I will have to delete the local references

To delete the local context, you must add a line env-> DeleteLocalRef (jniRef) , where jniRef is an object that you are creating in JNI for example eg jstring The code in the link you shared will not cause the local reference table overflow. An overflow will only happen if you are creating too many objects (usually in the loop) in the context of a function call, because the function exits when all local references are automatically cleared. Post some code for more help

No comments:

Post a Comment