-1

I`ve searched a lot about this problem but I didn´t find anything, hoping someone does it, here is my question:

Ive tested the app in the simulator a lot of times. I have ARC and all the outlets released in the viewDidUnload (Ive quite a lot of images). When I run it on the simulator, the memory continues rising again and again, when changing between views.

For example, I have a button in a view. And right clicking it, I drag it to another view, connecting them. Do I need to release anything relating in this way the views? If so, where I put the code? (I have a .h and .m for each view).I have read a lot of questions like this, but all off them referred to views related by code, not using the drag option (Style - modal)

Please I would thank a lot any clue or help, as I have to solve this problem in a short period of time,

Thanks in advance :)

4

1 回答 1

0

viewDidUnload从 iOS6 开始不再调用。这或许可以解释正在发生的事情。

当控制器的视图从内存中释放时调用。(在 iOS 6.0 中已弃用。在内存不足的情况下不再清除视图,因此永远不会调用此方法。)

此外,viewDidUnload通常在由于内存压力而卸载视图时调用它,因此无论如何都希望您从您的dealloc方法中调用它。

dealloc尝试在or中进行 niling viewDidDisappear

您还应该知道,如果您使用UIImage'simageNamed加载图像,此方法将缓存图像。因此,即使您将它们从视图中删除,它们也会保留在系统的缓存中。

如果没有看到你的代码,就不能说更多了。

于 2013-10-10T17:12:06.883 回答