Skip to content

JNI should DeleteLocalRef !? #10

@Yehsam23

Description

@Yehsam23

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);

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions