In my iPad app at one moment I load 100 images from Photo Stream using ALAsset and following code:
ALAsset *asset = [assets objectAtIndex:[sender tag]];
ALAssetRepresentation *representation = [asset defaultRepresentation];
UIImage *image = [[UIImage alloc] initWithCGImage:[representation fullScreenImage]
scale:1.0f
orientation:0];
And everything works perfectly. But when I cache it to the file system as JPEG files, and then load them again with UIImage *image = [UIImage imageWithContentsOfFile:fullPath]
, application crashes with Memory Warning, and I can see in the profiler that it really uses a lot of RAM.
Why is this happening?