AppLovin / AppLovin-MAX-SDK-Android

Other
233 stars 104 forks source link

AppLovinFullscreenActivity memory leak on Android version 14 #683

Closed LevGloba closed 4 months ago

LevGloba commented 4 months ago

MAX SDK Version

12.5.0

Device/Platform Info

Android14.0, Google Pixel 8 Pro

Current Behavior

The AppLovinFullscreenActivity is not destroyed and creates a memory leak in Android version 14. After viewing a rewarded or embedded ad, and calling the destroy method on the MaxInterstitialAd or MaxRewardedAd. leanks

Expected Behavior

No response

How to Reproduce

On Android version 14. call loading, and then display advertising from the fragment, after showing the advertisement and when it is hidden, close the fragment. Then open the fragment, repeat the steps described above and close.

Additional Info

No response

applovinAsh commented 4 months ago

@LevGloba, Are you able to recreate the issue in our demo application?

LevGloba commented 4 months ago

I recreated the issue with a memory leak on an emulator device: Google Pixel 6 (Android version 13.0); Google Piskel 8 pro (Android version 14.0), in the AppLovin MAX application Demo in Kotlin language

leanks_appLovin_max_api 33

leanks_appLovin_max

LevGloba commented 4 months ago

I also noticed in the profile that AppLovinFullscreenActivity stopped being destroyed after clicking on the cross.

stopped_destpry

applovinAsh commented 4 months ago

@LevGloba - I am looking into this and will update you when more information is available. We appreciate your patience.

applovinAsh commented 4 months ago

@LevGloba - We have identified the issue and fixed the leak in our demo app. You can find the changes here: https://github.com/AppLovin/AppLovin-MAX-SDK-Android/commit/c59e86417193989f006255e53eed6f6d6dfb0649