Hi - I'm testing out the Unity plugin for Google Mobile Ads v3.0.4 (using GoogleMobileAds.framework 7.8) on Unity 4.7.2, building for iOS onto an iPhone4.
I'm using Instruments/Activity Monitor/Real Memory to monitor ram usage of my game and noticed that after a banner ad is played and then destroyed (after a new scene is loaded)
that there's some extra memory being used by the banner that never gets freed. This keeps increasing to a higher amount every time I enter and leave the scene with the banner ad in it.
Also - the banner ad can pop on in a scene where there is no reference the banner object! Nothing references the banner ad outside of the scene it gets created in.
It gets destroyed in the scene it is created in here:
void OnDestroy()
{
if (bannerView != null)
{
bannerView.Destroy();
}
}
It gets created one time in Start() here:
bannerView = new BannerView(adUnitId, AdSize.SmartBanner, AdPosition.Top);
// Register for ad events.
bannerView.OnAdLoaded += HandleBannerAdLoaded;
bannerView.OnAdFailedToLoad += HandleBannerAdFailedToLoad;
bannerView.OnAdLoaded += HandleBannerAdOpened;
bannerView.OnAdClosed += HandleBannerAdClosed;
bannerView.OnAdLeavingApplication += HandleBannerAdLeftApplication;
// Load the banner with the request.
bannerView.LoadAd( GlobalStuffManager.Inst.CreateAdRequest() );
bannerView.Show();
Any ideas? Maybe it's something to do with arc? Automatic Reference Counting is disabled for my Xcode project by default...is that an issue?
Thanks for any help!