We use just "basic" Interstitial ads - not "rewarded videos" - directly from Java.
And yes "new InterstitialAd(activity)" does leak the activity instance every time.
The leak is not the callback (and so setting it to null does not help), it's a instance of "bx" (obfuscated name) which in turn holds a "hard" reference to the context.
It seems there are several of these "bx" objects per each InterstitialAd.
I tested with ads-lite 12.0.1 using Android Studio memory analyzer.
Leaking Activity objects is bad. They're typically fairly large with a large memory tree - fragments, views, data model, etc. and so this leak can easily cause crashes.
And crashes are bad for users, and also bad for developers because of Android Vitals.
--
---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-admob-ads-sdk/3eaa43bb-95da-40bf-85cd-a876cdbaa7e1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-admob-ads-sdk/5453b88c-01b0-4cdb-8038-bbce8e6bae23%40googlegroups.com.
Hi Sam,Not sure you got my previous reply. Many thanks for getting back to me. I've posted a new thread regarding the banner ads at https://groups.google.com/d/topic/google-admob-ads-sdk/rxho6omy058/discussion . Having trouble attaching the sample to it though...Lucas.
On Monday, 29 October 2018 20:57:55 UTC, mobileadssdk-a...@google.com wrote:
Hi Lucas,Sorry for the delayed reply, for some reason this got stuck in my inbox while I was OOO.This is tracking leaks with rewarded and interstitial ads, we are not aware of leaks being created due to banner ads, are you certain that this is caused by the SDK?
Can you file a separate thread and include details on your implementation and perhaps a reproducing sample?Regards
Sam
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
http://googleadsdeveloper.blogspot.com
https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
On 10/14/18 09:45:44 oak...@gmail.com wrote:
--Hi Mobile Ads SDK team,Are there any more updates on when a fix will be available for this please? LeakCanary is still reporting leaks of activities when I display banner ads using the latest SDK, com.google.android.gms:play-services-ads:17.0.0.Can you advise what workaround to use until a fix is available? I'm contemplating removing ads altogether from my app at this rate, which seems pretty drastic:(.Thanks, Lucas.
---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsubscrib...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-admob-ads-sdk/5453b88c-01b0-4cdb-8038-bbce8e6bae23%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-admob-ads-sdk/351546e4-da41-4f8e-90af-5649e0b49bf6%40googlegroups.com.