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
@@ -227,8 +227,6 @@ JNICALL Java_com_reecedunn_espeak_SpeechSynthesis_nativeDestroy( | |||
if (nat) { | |||
env->DeleteWeakGlobalRef(nat->object); | |||
delete nat; | |||
} else { | |||
env->DeleteWeakGlobalRef(object); | |||
} | |||
return JNI_TRUE; |