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!