Low memory warning with several EGOImageView
2012-10-30 07:34
423 查看
EGOImageView can lead to memory leaks, be aware.
First of all, check if it releases _responseData in EGOImageLoadConnection's dealloc so that it looks like:
Then call cancelImageLoad when deallocating a view which uses it and nil its image attribute (remember, I use ARC code sample):
And I'd also recommend to call sometimes:
Anyway, feel free to use Instruments. Open Allocations instrument, click VM Tracker and set automatic snapshots to 1 sec delay. Then watch Dirty memory
column and Memory Tag 70 line, which shows how much memory images consume in your application.
转帖:http://stackoverflow.com/questions/11437497/low-memory-warning-with-several-egoimageview
First of all, check if it releases _responseData in EGOImageLoadConnection's dealloc so that it looks like:
- (void)dealloc { self.response = nil; self.delegate = nil; [_connection release]; [_imageURL release]; [_responseData release]; //this line is absent in current EGOImageLoadConnection.m [super dealloc]; }
Then call cancelImageLoad when deallocating a view which uses it and nil its image attribute (remember, I use ARC code sample):
- (void)dealloc { //... self.myView.image = nil; [self.myView cancelImageLoad]; //... }
And I'd also recommend to call sometimes:
[EGOCache.currentCache clearCache];
Anyway, feel free to use Instruments. Open Allocations instrument, click VM Tracker and set automatic snapshots to 1 sec delay. Then watch Dirty memory
column and Memory Tag 70 line, which shows how much memory images consume in your application.
转帖:http://stackoverflow.com/questions/11437497/low-memory-warning-with-several-egoimageview
相关文章推荐
- SDWebImage与UIScrollView或UICollectionView一起使用多次收到“Received memory warning.”,最终程序闪退的原因分析和解决办法。
- 图片不能显示: [cell.imageView setImageWithURL:imageUrl placeholderImage:nil options:SDWebImageLowPriority
- iOS-OC-tableview SDWebImage加载多张图片内存警告(received memory warning)
- iOS tableview SDWebImage加载多张图片内存警告(received memory warning)
- 去除android ImageView “[Accessibility] Missing contentDescription attribute on image” warning
- loadView 与 viewDidLoad 和 didReceiveMemoryWarning与viewDidUnload 详解
- 用colorWithPatternImage设置view背景色太占内存,替代方法
- EGOImageView的使用方法及注意事项
- EGOImageView的使用方法及注意事项
- EGOImageView 滚动无法加在图片
- 用colorWithPatternImage设置view背景色太占内存,替代方法
- EGOImageView的使用方法及注意事项
- didReceiveMemoryWarning:和viewDidUnload:
- uiscrollview UIView 设置背景图片 swift 不用colorWithPatternImage
- 去除android ImageView “[Accessibility] Missing contentDescription attribute on image” warning
- EGOImageView第三方库的应用
- 用colorWithPatternImage设置view背景太占内存,替代方法
- [Pandas error]sys:1: DtypeWarning: Columns (0,1) have mixed types. Specify dtype option on import or set low_memory=False.
- iOS多线程-SDWebImage简单介绍 1 设置imageView的图片 (内存缓存&磁盘缓存) 1 [cell.imageView sd_setImageWithURL:[NSURL URL
- egoimageview 使用2