【发布时间】:2011-12-10 13:45:23
【问题描述】:
我正在使用 Apple 的 ScrollingSuite 来显示带有大量大图像的大型滚动视图。(768 x1024)图像视图的图像由
设置controller.numberImage.image = [self.contentList objectAtIndex:page];
其中,numberImage 是一个 UIImageView,而控制器是我在滚动视图中添加的 viewcontroller 的一个对象。当页面滚动到视图之外时,我将图像设置为 nil
controller.numberImage.image = nil;
但问题是我的应用程序在滚动图像时内存不足,收到内存警告。每次显示新图像时,我都可以看到仪器工具(Memory Tag 70)中的内存增加,谷歌搜索结果显示为 ImageIO。请帮我解决这个问题
提前致谢
【问题讨论】:
-
你认为 self.contentList 会在内存中保留图像的引用吗?应该释放每个引用以释放对象。
标签: iphone memory-leaks uiimageview uiimage didreceivememorywarning