How is state kept when accessing methods through JNI? In the example below my Java code is calling the native method drawFromJni, will my native class _nc be persisted between calls?
If there were better native debugging tools for the NDK this would be pretty easy to find out, but I'm really having problems with the NDK and C++.
extern "C" {
JNIEXPORT void JNICALL Java_com_jnitest_SurfaceRenderer_drawFromJni(JNIEnv * env, jobject obj);
};
myNativeClass _nc;
JNIEXPORT void JNICALL Java_com_jnitest_SurfaceRenderer_drawFromJni(JNIEnv * env)
{
_nc.draw();
}