小应用程序收到“didReceiveMemoryWarning”开始后立即

发布于 2024-11-03 11:41:21 字数 523 浏览 6 评论 0原文

通常,当在我的应用程序之前打开很多应用程序时,我会收到“didReceiveMemoryWarning”,然后,一段时间后,iOS 通常会关闭我的应用程序。 这实际上已经成为一个值得注意的问题。

在过去的几天里,我读了这么多,所以考虑了“didReceiveMemoryWarning”。包括这里的帖子。不幸的是没有找到解决方案。

我知道我必须释放对这个警告的所有记忆,等等…… 问题是应用程序启动后没有任何内容可以释放。我在内存中有一个带有 AdMob 4.0.2 横幅的 UIViewControlled 和一个提供应用程序数据的自己的容器 - 这是 NSMutableArray 中的一些记录。 启动后,我的应用程序占用了 1.3 Mb – 根据 Instruments 的说法,在这个初始状态下,我的应用程序无法工作,而且我肯定知道没有内存泄漏。

怎么了? 我发现一些重型游戏可以毫无问题地启动,但同时我的应用程序在这种情况下得到“didReceiveMemoryWarning”并关闭。 在这种情况下有没有办法正常工作。 有什么技巧吗?

预先感谢您的建议。

Often, when a lot of applications were opened before my application I get "didReceiveMemoryWarning" and then, after a while iOS usually closes my application.
This is actually become a noticeable problem.

I have read so much so much consider to "didReceiveMemoryWarning" for the last few days. Including posts here. Unfortunately no solution found.

I know that I have to release any memory on this warning and bla-bla-bla…
The problem is that right after application start there is nothing to release. I have one UIViewControlled in memory with AdMob 4.0.2 banner and one own container that serves application data - which is a few records in NSMuttableArray.
Right after start my application takes 1.3 Mb – according to Instruments and at this initial state my application was not working and I definately know no memory leaks.

What is wrong?
I see that some of the heavy games can be started with no problems, but in the same time my application in this case gets "didReceiveMemoryWarning" and is closed.
Is there a way work in normal way in this situation.
Is there some tricks?

Thanks in advance for your suggestions.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

热鲨 2024-11-10 11:41:21

你在哪里分配 NSMUtableArray ?我认为它经常被分配! (只是一个可能性...)你释放 NSMutableArray 了吗?

Where are you allocating the NSMUtableArray? I think it's being allocated often! (Just a probability...) Do you releasing the NSMutableArray?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文