No, this will not happen, however your code will work on versions of Android earlier than ICS. From ICS, this code will complete correctly.
In general, you do not need to delete local links yourself, as soon as the JNI function returns to Java, the links will get GC'd.
An exception to this rule is if you create a lot of them, possibly in a loop. You can then populate the local lookup table. See IBM: An Overview of JNI Object Links .
You should read the JNI Local Reference Changes on ICS . Even if you are not writing for Android, it still identifies many common errors.
Eoin
source share