0
我有兩個圖像。 所述一個被保存在束從文檔文件夾加載圖像時出現內存不足
NSString *imagePath = [NSString stringWithFormat:@"%@/%@",_path,[contents objectAtIndex:0]];
其他被保存在文件夾
NSFileManager *filemanager = [NSFileManager defaultManager];
NSArray *contents = [filemanager contentsOfDirectoryAtPath:_path error:nil];
NSString *imagePath = [NSString stringWithFormat:@"%@/%@",_path,[contents objectAtIndex:0]];
負載圖像的UIImageView
_avatar = [UIImage imageWithContentsOfFile:filePath];
如果我從束加載圖像,使用存儲器增加到2Mb 如果我從文檔加載圖像,使用內存增加到40MB 兩個圖像的大小是2448x3264
確實在這裏有錯誤。