Admob Memory Leak - avoiding by using empty activity

后端 未结 3 912
眼角桃花
眼角桃花 2020-12-23 02:38

Our app is getting hit pretty hard by a memory leak. I\'ve found that the root cause is the AdMob AdView keeping references to old activities. The problem is pretty well d

3条回答
  •  情话喂你
    2020-12-23 02:52

    I was seeing this same leak with the 6.1.0 SDK, but was able to resolve it by calling destroy() on the AdView in question in my Activity's onDestroy. I think they have fixed it. The destroy() seems to get rid of the PhantomReferences that the AdView's WebView had to my Activity that was keeping the Activity from being GC.

提交回复
热议问题