its due to assest library. Once u fetched the image using assest libary just store it in some variable and re-use that image in
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
while scrolling the collection view it will fetch the image again and again using asset libary this will cause huge memory leak.
Edit:
UIImage *img =[imageDictionary objectForKey:imageName];
if(!img)
{
NSURL *asseturl = [NSURL URLWithString:imageName];
img = [McAssetReader readImage:asseturl];
[imageDictionary setObject:img forKey:imageName];
}
where imageDictionary is the Global Dictionay for holding the image. imageName is the url for particular image.