Unity Rewarded ads do not clear cache after ad close.

540 views
Skip to first unread message

Sadam Hussain

unread,
Feb 4, 2020, 3:11:10 AM2/4/20
to Google Mobile Ads SDK Developers
Unity Rewarded ads do not clear cache after ad close. How to handle Rewarded ads to avoid memory leaks?

Mobile Ads SDK Forum Advisor Prod

unread,
Feb 4, 2020, 3:55:29 AM2/4/20
to sadda...@gmail.com, google-adm...@googlegroups.com

Hi Sadam,

 

Thank you for reaching out to us.

 

You may choose to destroy the rewarded ad GameObject after the user has closed it, but before instantiating another rewarded ad through that same object. However, if you are referring to the caching to the actual rewarded video creatives, then I'm afraid that the AdMob SDK has no control over those. You will have to resort to using the Android settings panels in order to clear the cache of the app itself for that one.

 

Regards,

Ziv Yves Sanchez

Mobile Ads SDK Team



ref:_00D1U1174p._5001UUzypG:ref

Mobile Ads SDK Forum Advisor Prod

unread,
Feb 6, 2020, 3:57:25 AM2/6/20
to sadda...@gmail.com, google-adm...@googlegroups.com

Hi Sadam,

 

Thank you for confirming that you are in fact destroying the rewarded ad GameObjects after use.

 

Could you kindly provide the details below (via Reply privately to author) so that I can further investigate the issue?

  • Unity SDK version
  • AdMob SDK version
  • Copy of your Unity project (reproducing the issue)
  • Copy of your XCode project (ported from Unity, if any)
  • Steps to replicate the issue

 

I will attempt to profile the projects that you'll be providing in order to track the source of the memory leaks. For the Unity project specifically: you may zip the entire Unity project (excluding the Library and Temp folders) in order to reduce its size. You may then send it (as well as the XCode project) to me via a shareable link from your Google Drive (or on any other file-sharing site that you prefer). Don't forget to send the shareable links via Reply privately to author.

 

As for your other concern with regard to multiple rewarded ads: you may check out this page to learn more about showing multiple rewarded ads.

Mobile Ads SDK Forum Advisor Prod

unread,
Feb 11, 2020, 12:40:39 AM2/11/20
to sadda...@gmail.com, google-adm...@googlegroups.com

Hi Sadam,

 

If you wish to use the same object instance to load rewarded ads with, then you may refer to this page for guidance on this. However, do note that that particular functionality is already deprecated. I recommend using the new API for rewarded ads instead from this page, which allows you to use multiple RewardedAd objects in order to cache a larger number of ads simultaneously.

Reply all
Reply to author
Forward
0 new messages