MoPub natives memory leak



Using the sample code, everything works fine. However as soon as you start adding multiple fragments into the backstack you start getting memory leaks.

If I have 3 fragments on top of each other in the back stack, and on the final fragment I use MoPub natives via the adapter, when pressing back, and closing the fragment, although the fragment is popped, MoPub keeps hold of all the memory.

I have confirmed this by simply removing the MoPub code and there is no leak without it.


Just to note, I am calling mopubadapter.destroy() in the onDestroyView.


It seems to only happen when I have multiple MoPub adapters running. For example, Fragment 1 has a MoPub adapter. I then open fragment 2 from 1 and open fragment 3 from 2. Fragment 3 also has a MoPub adapter. After I close fragment 3, the memory leak occurs.

If I remove the mopub adapter from fragment 1 and only have it in fragment 3, no leak occurs.


Hi @Scott,

Thanks for reaching out to us! At this point, we do not have enough information to help you resolve this issue. If the issue is outstanding, can you reach out to our Support Team at so one of our Support Team members can escalate this on your behalf? Feel free to include the link to this forum post in your email to the Support Team.