Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JNI should DeleteLocalRef !? #10

Open
Yehsam23 opened this issue May 20, 2013 · 0 comments
Open

JNI should DeleteLocalRef !? #10

Yehsam23 opened this issue May 20, 2013 · 0 comments

Comments

@Yehsam23
Copy link

Hi~~The AnalyticX.cpp file should DeleteLocalRef when method is done?

Just like

if (!isHave) {
//do nothing
} else {
jstring stringArg0 = minfo.env->NewStringUTF("flurryLogEvent");
jstring stringArg1 = minfo.env->NewStringUTF(eventName);
jstring stringArg2 = minfo.env->NewStringUTF("false");

minfo.env->CallStaticVoidMethod(minfo.classID, minfo.methodID, stringArg0, stringArg1, stringArg2);

minfo.env->DeleteLocalRef(stringArg0);
minfo.env->DeleteLocalRef(stringArg1);
minfo.env->DeleteLocalRef(stringArg2);
minfo.env->DeleteLocalRef(minfo.classID);

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant