The ART runtime is stricter about calling env->DeleteWeakGlobalRef on an object/value that was not returned from env->NewWeakGlobalRef. In that case, it triggers an abort which causes the application to crash and display an "Application has stopped" dialog message.master
| if (nat) { | if (nat) { | ||||
| env->DeleteWeakGlobalRef(nat->object); | env->DeleteWeakGlobalRef(nat->object); | ||||
| delete nat; | delete nat; | ||||
| } else { | |||||
| env->DeleteWeakGlobalRef(object); | |||||
| } | } | ||||
| return JNI_TRUE; | return JNI_TRUE; |