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
Post a Comment