CustomEventBannerAdapter anonymous class leaking mMoPubView

mopub

#1

Hey there,

I am part of an Android team and we are trying to tackle memory leaks as part of our app performance review.

The tool that we are currently using is LeakCanary and it detected that CustomEventBannerAdapter’s anonymous Runnable is leaking mMoPubView / Context. I am guessing the timeout set outlives the adapter due to the way the Runnable is set anonymously.

I am not sure if there is a way to handle this by a class holding reference to CustomEventBannerAdapter. One way that could fix this is making the Runnable a static variable so the GC can take care of it after it’s done.

Any thought? Thanks!

Version: mopub-sdk-banner-5.0.0


#2

Hi,

Thanks for reporting this!
This is a known issue and our engineering team is already looking into it.
We will let you know once it gets fixed.


#3

Great, thanks!