From 607eb798c1853bfb0d05445edbe5a6709285a2f3 Mon Sep 17 00:00:00 2001 From: Moris Gateno Date: Thu, 7 Mar 2024 15:15:18 +0200 Subject: [PATCH] deleting J objects --- Classes/AppsFlyer/AppsFlyerXAndroid.cpp | 3 +++ 1 file changed, 3 insertions(+) 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"); }