diff --git a/Classes/AppsFlyer/AppsFlyerXAndroid.cpp b/Classes/AppsFlyer/AppsFlyerXAndroid.cpp index 7911a9a..5d05f54 100644 --- a/Classes/AppsFlyer/AppsFlyerXAndroid.cpp +++ b/Classes/AppsFlyer/AppsFlyerXAndroid.cpp @@ -108,6 +108,9 @@ void AppsFlyerXAndroid::setConsentData(const AppsFlyerXConsent& consentData){ jniGetInstance.env->CallVoidMethod(afInstance, methodId, resultConsent); + jniGetInstance.env->DeleteLocalRef(resultConsent); + jniGetInstance.env->DeleteLocalRef(afInstance); + jniGetInstance.env->DeleteLocalRef(jniGetInstance.classID); } else { CCLOGERROR("%s", "'AppsFlyerLib' is not loaded"); }