SpringBoard内存分配(iPhone / iPad) [英] SpringBoard memory allocation (iPhone/iPad)

查看:128
本文介绍了SpringBoard内存分配(iPhone / iPad)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个使用大量内存用于图像和OpenGL纹理的应用程序。

I have an application under development that uses a large amount of memory for images and OpenGL textures.

我偶尔注意到,实际上在某些设备上经常发生, SpringBoard,管理iPhone和iPad主屏幕的应用程序可能占用过多的内存,有时是正常情况的两倍。

I have noticed that occasionally, in fact frequently on some devices, SpringBoard, the application which manages the home screen for the iPhone and iPad can take up excessive amounts of memory, sometimes twice as much as normal.

当发生这种情况时,会发送我的应用程序在内存警告,甚至崩溃。我的图像确实会尽快发布,但我相信由于数量庞大,它只是不够好而且还会导致崩溃......

When this happens, it sends my application in to memory warnings and even crashes. My images do get released as soon as possible, but I believe that due to the sheer volume, it simply isn't good enough and still results in crashing...

我在关于SpringBoard的Apple文档中找不到太多内容,但它让我感到沮丧。

I can't find much in the Apple docs about SpringBoard, but it's pissing me off.

有关找出导致SpringBoard如此激进的原因的任何想法或指示?

Any ideas or pointers on figuring out what causes SpringBoard to be so aggressive?

推荐答案

答案是MKAnnotationViews,尽管是自动释放的,但却汇集在SpringBoard的内存空间中,而不是我自己的应用程序在仪器中并没有非常清楚地表现出来。

The answer was that MKAnnotationViews, despite being autoreleased, were pooling up in the memory footprint of SpringBoard, as opposed to my own app, and were not manifesting themselves very clearly in Instruments.

这对Apple来说是一个相当具有欺骗性的事情,特别是因为它们允许你自动释放并且从不使用对象,但它实际上永远不会被释放......因此技术上并不是仪器和静态分析中的泄漏,但仍然可以轻易导致与内存相关的崩溃。

This is a fairly deceptive thing on Apple's part, particularly in that they allow you to autorelease and never use an object, but it will never actually be released... therefore it is technically not a leak in the eyes of Instruments and static analysis, but can still easily lead to memory related crashes.

这篇关于SpringBoard内存分配(iPhone / iPad)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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