iAd的&放大器; AdMob的沉重记忆 [英] iAd & AdMob Heavy on Memory

查看:222
本文介绍了iAd的&放大器; AdMob的沉重记忆的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚完成我的编码为iOS平台的新游戏,现在我决定,现在是时候在屏幕底部集成的iAd / AdMob的横幅。我已经完成了实施和iAd的被显示出来,如果​​失败,那么它被替换AdMob广告横幅。这是伟大的,但我检查过的应用程序和之前的IAD / AdMob的整合,我的应用程序是用各地的内存19MB运行内存消耗 - 与内部审计部门/ AdMob的整合,它使用了50MB内存运行。我有一个关于这两个问题 - 他们应该是这样的内存重这样还是我做错了什么?其次,它好像这些旗帜的观点从来没有得到从内存中释放。我已经尝试设置adBannerView =零,然后按[adBannerView removeFromSuperview],但仍然没有任何反应和记忆并不因此而减少的。 F.Y.I - 我的游戏是ARC启用

I've just completed coding my new game for the iOS platform and now I decided that it is time to integrate iAd/AdMob banners at the bottom of the screen. I have completed the implementation and an iAd is showing up and if it fails then it is replaced by an AdMob banner. This is great, however I checked over the memory consumption of the app and prior to iAd/AdMob integration, my app was running using around 19MB of memory - with the the iAd/AdMob integration, it is running using over 50MB of memory. I have two questions regarding this - are they supposed to be so memory-heavy like this or am I doing something wrong? Secondly, it seems as if these banner views are never getting released from memory. I have tried setting adBannerView = nil followed by [adBannerView removeFromSuperview] but still nothing happens and the memory does not lessen at all. F.Y.I - my game is ARC enabled.

在这个问题上的任何帮助将不胜AP preciated!谢谢你。

Any help on this matter would be greatly appreciated! Thanks.

推荐答案

您所观察的内存增长是WebKits堆贡献的结果。这个不幸的行为得到了很多愤怒的对象。你会发现类似的行为,如果你尝试加载使用自己的Web视图的横幅。同时也出现了类似的讨论在这么喜欢这个和的这个,开发人员已被锁定在一个徒劳的战争,以试图减少网络负载的内存影响

The memory growth you are observing is a result of WebKits contribution to the heap. This unfortunate behavior has been the subject of a lot of outrage. You will find similar behavior if you try and load the banners using your own web views. There has also been similar discussions on SO like this one, and this one where developers have been locked in a futile war to attempt to reduce the memory impact of web loading.

我个人没有使用过网络成瘾者,但是我很熟悉iOS上的谷歌广告的整合,我们看到显著内存增加后实施。

I personally haven't used iAds yet but I am very familiar with Google Ad integration on iOS and we saw significant memory increases post-implementation.

话虽这么说,你应该考虑观察调试内存计,模拟内存警告,然后您的使用情况应该下降。在大多数情况下我所遇到的WebKit做删除其内存中缓存的一份体面的工作。

That being said you should consider observing the debug memory gauge, simulate a memory warning, and then your usage should drop. In most scenarios I have encountered WebKit has done a decent job of removing its In-Memory cache.

不过,如果这些内存警告不处理你一定要设法发送错误报告。

However, If these memory warnings are not handled you should definitely seek to file a bug report.

这篇关于iAd的&放大器; AdMob的沉重记忆的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆