iPad, iOS6 very long delay between viewWIllAppear and view appearing on the screen

巧了我就是萌 提交于 2019-12-01 12:55:30

After profiling the app, I figured out that two issues were at play:

1) I was saving large UIImages as binarydata into coredata, which should not be done if NSFetchedResultsControllers are used, as they pulled out all of the image data and kept it in memory.

2) iOS6 has changed the way viewDidUnload works - it is never called, so I added some calls to manually free up objects when my view controller disappears.

The end result is that the memory footprint is at around 4mb baseline now, getting higher as I push the previously offending controller. Additionally, I can push/pop the controler mulitple times without out of memory crash.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!