c++ - What is the difference between ReleaseFloatArrayElements and DeleteLocalRef -


i'm trying android apps using jni. have method take input array(jfloatarray featurepoints):

jfloat* flt1 = env->getfloatarrayelements(featurepoints,0); 

after using array tried release memory. should use

env->releasefloatarrayelements(featurepoints, flt1, 0); 

or

env->deletelocalref(featurepoints); 

you need call releasexxarrayelement() when have used getxxarrayelements() undo work.

env->releasefloatarrayelements( featurepoints , (jfloat *)flt1, 0); // cleanup local ref  env->deletelocalref(featurepoints); 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

javascript - Clean way to programmatically use CSS transitions from JS? -

android - send complex objects as post php java -