Reputation: 3971
I found a couple of Memory Management articles that mentioned UIImage's imageNamed
causing problems when you have a lot of large images in memory.
http://akosma.com/2009/01/28/10-iphone-memory-management-tips/ http://www.alexcurylo.com/blog/2009/01/13/imagenamed-is-evil/
Both of these were written for OS version <= 3.0.
Does anyone know if these are still a problem in iOS 4?
Upvotes: 2
Views: 1698
Reputation: 1876
it does. In combination with UIPageViewController, definitely it does. trying to build a kids application displaying animal's sound and cartoon keyFrame animation all individual animal details are in their own UIViewController All views are displayed in UIPageViewController (Transition:scroll). Didn't know about imageNamed bug and for nearly a month , thought it was a problem caused by UIPageViewController. Memory was never being released by ARC. ASA i switched to imageWithContentsOfFile instead of imageNamed, all problems solved. UIPageViewController was innocent in real. It works smooth now. No unreleased memory problem.
Upvotes: 0
Reputation: 3552
If you look at this link: Dispelling the UIImage imageNamed: FUD you'll see there are really two problems with large images and imageNamed:
So to recap: 1 is no longer a problem, 2 might be.
Upvotes: 2