Should I Destroy InterstitialAd after show?

1,318 views
Skip to first unread message

k song

unread,
Apr 29, 2017, 11:53:25 AM4/29/17
to Google Mobile Ads SDK Developers
Hi, 

Firstly, thank you for making this groups to help us like me.

But I have some questions.

1.  Should I Destroy()  InterstitialAd after show?

That my code is like this ; 
    InterstitialAd  _interstitial = new InterstitialAd(adUnitId);  // Do it only once when start.

    _interstitial.LoadAd(builder.Build()); // And loadAd again and again.....

It looks work well in my game, but should I Destroy() _insterstial  when after show?


2. Should I Destroy() BannerView like above, also?

thanks.

Deepika Uragayala- MobileAds SDK team

unread,
May 1, 2017, 2:45:16 PM5/1/17
to Google Mobile Ads SDK Developers
Hi Song, 

Let me answer you questions in detail :


1.  Should I Destroy()  InterstitialAd after show?
 
When you're finished using the Banner Ad or Interstitial Ad, make sure to call the Destroy() method before dropping the reference.

For an Interstitial Ad, Interstitial object can be used only once, it should be destroyed after displaying the Ad. Although, you can create a new Interstitial Ad and reassign to the old object but make sure to destroy the old instance.

2. Should I Destroy() BannerView like above, also?
 
For a Banner Ad, you can use a single BannerView and show multiple Ads without calling a Destroy(), as long as you maintain a reference to them. 

Calling the Destroy() method ensures that the object is no longer in use, avoiding memory leaks. For more information on this, you can go through this page.

Let me know if you have any other questions. I will be happy to assist you.

Regards,
Deepika Uragayala
Mobile Ads SDK Team

k song

unread,
May 7, 2017, 1:29:44 AM5/7/17
to Google Mobile Ads SDK Developers
Thank you for your reply.

The reason why I asked it is when I use BannerView,  it is not refreshed automatically with "Google optimization" option.  

So I think should I hide and  Destroy() and Create() new one.

I see some other Dev have same issue of banner refresh with google optimization.

I know what you mean, and thank you

Deepika Uragayala- MobileAds SDK team

unread,
May 8, 2017, 12:29:58 PM5/8/17
to Google Mobile Ads SDK Developers
Hi song,

Currently there is an issue with "Google optimized" Ad Refresh and this is something our team is working on. I will ping this thread and update you if I have any new information.


Regards,
Deepika Uragayala
Mobile Ads SDK Team


k song

unread,
May 8, 2017, 12:36:04 PM5/8/17
to Google Mobile Ads SDK Developers
Thank you so much

Deepika Uragayala- MobileAds SDK team

unread,
Jul 14, 2017, 2:18:32 PM7/14/17
to Google Mobile Ads SDK Developers
Hi Song,

The issue has been fixed by our team and you can monitor our release history page for the updates on new releases. 

Regards,
Deepika Uragayala
Mobile Ads SDK Team


On Monday, May 8, 2017 at 12:36:04 PM UTC-4, k song wrote:
Thank you so much
Reply all
Reply to author
Forward
0 new messages