iPhone 对象分配、GeneralBlock-24 和 GeneralBlock-24通用Block-48

发布于 2024-08-02 18:01:16 字数 281 浏览 2 评论 0原文

iPhone 应用程序启动后出现 3 次内存泄漏。无论我在应用程序中做什么,这些都保持不变(不再泄漏)。

我的净对象分配不断增长。特别有两个块,GeneralBlock-24 和 GeneralBlock-24。 GeneralBlock-48。

当程序正在使用时,Block-48 会变得特别糟糕,占用兆字节的内存。似乎在两个块中分配对象的库是 QuartzCore。

该应用程序引用了 QuartzCore 框架,但我删除了所有对它的引用。

ps:这都是在设备上,而不是模拟器上

I have 3 memory leaks after the launch of the iPhone application. These remain constant no matter what I do in the App (no more leaks).

My Net Object Allocation keeps growing. There are two blocks in particular, GeneralBlock-24 & GeneralBlock-48.

Block-48 gets specially bad as the program is being used, taking Megabytes of memory. The Library that seems to be allocating the objects in both blocks is QuartzCore.

The App had a reference to the QuartzCore framework, but I have eliminated all references to it.

p.s.: this is all on device, not the simulator

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

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

发布评论

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

评论(1

浮光之海 2024-08-09 18:01:16

找到了!当使用 Instruments 在模拟器上运行它时,GeneralBlocks 将报告为单个 GeneralBlock-0。通过网络搜索,似乎仪器 objectAlloc 报告和 QuartzCore 中存在错误。

所以我刚刚添加了一个内存监视器工具,发现尽管我的对象分配不断增长,但我的真实内存保持平稳(嗯,在半MB内上下移动)

我希望这对其他人有用,我花了天搜索 GeneralBlock-24 和48 试图弄清楚它,直到决定在模拟器中运行它只是为了好玩

Found it! When running it on the simulator with Instruments the GeneralBlocks are reported as a single GeneralBlock-0. Searching through the web it seems that there is a bug in instruments objectAlloc reporting and QuartzCore.

So I just added a Memory Monitor instrument and saw that even though my Object Allocation kept growing non-stop, my Real Memory remained flat (well, moving up/down within half a MB)

I hope it's useful info to others, I spent a day searching for GeneralBlock-24 & 48 trying to figure it out until deciding to run it in the simulator just for the heck of it

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