googleads/googleads-mobile-android-examples

Memory Leak in API Demo Fragments

ipena-spigot opened this issue · 0 comments

Description:

There's a memory leak in the following demo fragments:

  • AdListener
  • Ad targeting
  • Banner sizes
  • Collapsible banner ad
  • Ad Preloading

Steps to reproduce:

  • In API Demo App
  • Open hamburger menu on the left
  • Select a demo fragment:
    • AdListener
    • Ad targeting
    • Banner sizes
    • Collapsible banner ad
    • Ad Preloading
  • Load the appropriate ad
  • Switch to a different fragment
  • Check for memory leak through Android Studio Profiler:
    • In android studio
    • Profiler
    • Analyze Memory Usage
    • Select identified fragment with memory leak
    • References
    • Show nearest GC root only

MemoryLeak Screenshots

AdMobAdListenerFragment - MemoryLeak
Screenshot 2024-11-14 at 3 25 53 PM

AdMobAdTargettingFragment - MemoryLeak
Screenshot 2024-11-14 at 3 29 32 PM

AdMobBannerSizesFragment - MemoryLeak
Screenshot 2024-11-14 at 3 38 01 PM

CollapsibleBannerFragment - MemoryLeak
Screenshot 2024-11-14 at 3 48 02 PM

AdMobPreloadingAdsFragment
Screenshot 2024-11-14 at 4 01 51 PM