对于大图像,UIImage 的 imageNamed 是否仍然会导致 iOS4 上的内存问题?
我发现几篇内存管理文章提到当内存中有大量大图像时,UIImage 的 imageNamed
会导致问题。
http://akosma.com/2009/01/28/ 10-iphone-内存管理-提示/ http://www.alexcurylo.com/blog/2009/ 01/13/imagenamed-is-evil/
这两个都是为操作系统版本 <= 3.0 编写的。
有谁知道这些在 iOS 4 中是否仍然存在问题?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
不再是问题,请参阅此处和也许在这里。
No longer a problem, see here, and maybe here.
如果您查看此链接:消除 UIImage imageNamed: FUD 您会看到那里大图像和 imageNamed 确实是两个问题:
回顾一下:1 不再是问题,2 可能是问题。
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.
确实如此。
与 UIPageViewController 结合使用,确实如此。
尝试构建一个显示动物声音和卡通关键帧动画的儿童应用程序
所有个体动物的详细信息都在自己的 UIViewController 中
所有视图都显示在 UIPageViewController 中(Transition:scroll)。
不知道 imageNamed bug,近一个月以来,一直以为这是 UIPageViewController 引起的问题。 ARC 从未释放过内存。
ASA 我切换到 imageWithContentsOfFile 而不是 imageNamed,所有问题都解决了。
UIPageViewController 实际上是无辜的。现在工作顺利。不存在未释放内存的问题。
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.