From ce19366e098341dd232f3e4daa619b9c3e135f84 Mon Sep 17 00:00:00 2001 From: bohowu Date: Fri, 22 Oct 2021 16:24:10 +0800 Subject: [PATCH] Fix ConversionListener not unregistered causing leak. --- .../java/com/appsflyer/appsflyersdk/AppsflyerSdkPlugin.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/android/src/main/java/com/appsflyer/appsflyersdk/AppsflyerSdkPlugin.java b/android/src/main/java/com/appsflyer/appsflyersdk/AppsflyerSdkPlugin.java index 6928c79..d510242 100644 --- a/android/src/main/java/com/appsflyer/appsflyersdk/AppsflyerSdkPlugin.java +++ b/android/src/main/java/com/appsflyer/appsflyersdk/AppsflyerSdkPlugin.java @@ -796,8 +796,12 @@ public void onReattachedToActivityForConfigChanges(ActivityPluginBinding binding @Override public void onDetachedFromActivity() { + AppsFlyerLib.getInstance().unregisterConversionListener(); activity = null; saveCallbacks = true; + mContext = null; + mApplication = null; + mIntent = null; } }