AppLovin / AppLovin-MAX-SDK-Android

Other
232 stars 104 forks source link

Google AdMob SDK Integration Memory Leak #744

Closed ipena-spigot closed 2 weeks ago

ipena-spigot commented 3 weeks ago

MAX SDK Version

13.0.1

Device/Platform Info

Pixel 4 XL - Android 13

Current Behavior

Android Studio Profiler tool detects memory leaks after rendering the following Ad formats when using Google AdMob SDK 23.5.0:

This is preventing Activities from getting garbage collected and ultimately causing ANRs and crashes

Expected Behavior

Resources / references should be released such that no memory leaks occur

How to Reproduce

Banner:

Interstitial

Mrec

Steps for: Check for memory leak with Android Studio***

Reproducible in the demo app?

Yes

Additional Info

Banner Google AdMob SDK 23.5.0 Memory Leak: Screenshot 2024-11-05 at 2 39 44 PM

Interstitial Google AdMob SDK 23.5.0 Memory Leak: Screenshot 2024-11-05 at 2 59 50 PM

Mrec Google AdMob SDK 23.5.0 Memory Leak: Screenshot 2024-11-05 at 3 26 06 PM

Mecze commented 2 weeks ago

Could this be causing the increase in ANRs lately? https://github.com/AppLovin/AppLovin-MAX-SDK-Android/issues/714

mattn02 commented 2 weeks ago

Hi @ipena-spigot - I was able to reproduce the memory leak. After analyzing the trace, the leak originates from Google AdMob's SDK. To verify this, I observed the same memory leak on AdMob's demo app after leaving the activity after the ad was displayed.

Since this issue stems from AdMob's SDK rather than ours, it would be best for you to reach out to the Google AdMob team for support. Thanks!