I am quite confused in the matter of Memory Utilization. My app crashes after loading a various amount of images (retrieved from Parse.com).
To make this simpler my app consists in showing images of certain categories so this is what I have: First you are presented with a 'PFQueryTableView' you select a 'cell' and are pushed to a 'ScrollView' loaded with 10 'PFImageView' and of course after swiping through the Images of lets say 5 previous cells, my app crashes due to Memory Pressure or Memory Error.
I am using the following code which I believe should help with cached data and not download it on the device:
- (PFQuery *)queryForTable{
PFQuery *query = [PFQuery queryWithClassName:self.parseClassName];
query.cachePolicy = kPFCachePolicyNetworkOnly;
return query;
That wouldn't do anything since the memory kept on rising so I tried adding custom cache settings:
- (void)viewDidUnload
{
[super viewDidUnload];
[PFQuery clearAllCachedResults];
}
To delete any data.. after viewing. But when I test the app, the memory utilized just keeps on rising for each cell clicked until it reaches about 550 MB and then crashes...
I also tried releasing my PFImageViews but can't since I am using ARC and it's supposed to do that automatically. So my question is, am I missing something? How do I set it for the images to be viewed without taking up that incredible amount of memory of the device?
Any help would be greatly appreciated! Thanks for you time in reading, and if it is really a basic question I apologize.