I am using UICollectionView to show all the images available in my library using assets, its displaying all the images but when I scroll up and down many times , I receive a memory issue in the device and after some time it gets crashed saying **CRASHED DUE TO MEMORY PRESSURE**
code used are as follows

creates here the collectionview and settings its delegate 

```
UICollectionViewFlowLayout *layout=[[UICollectionViewFlowLayout alloc] init];
allPhotosCollectionView=[[UICollectionView alloc]initWithFrame:CGRectMake(5, 5, 310, 481)collectionViewLayout:layout];
[allPhotosCollectionView setDelegate:self];
[allPhotosCollectionView registerClass:[UICollectionViewCell class] forCellWithReuseIdentifier:@"Cell"];
[allPhotosCollectionView setDataSource:self];
[self.view addSubview:allPhotosCollectionView];

```

delegate methods

```
- (NSInteger)collectionView:(UICollectionView *)view numberOfItemsInSection:(NSInteger)section
{
return [allImageArray count];
}
- (NSInteger)numberOfSectionsInCollectionView: (UICollectionView *)collectionView
{
return 1;
}
- (CGSize)collectionView:(UICollectionView *)collectionView layout:       (UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath   *)indexPath
{
return CGSizeMake(95, 100);
}

- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
NSString *identifier = @"Cell";
UICollectionViewCell *cell=[collectionView dequeueReusableCellWithReuseIdentifier:identifier forIndexPath:indexPath];
// allimageArray has the Assest URL fo the images
NSURL *aURL=[[NSURL alloc]initWithString:[NSString stringWithFormat:@"%@",[allImageArray objectAtIndex:indexPath.row]]];
[assestLibrary assetForURL:aURL resultBlock:^(ALAsset *asset)
 {
     UIImage  *copyOfOriginalImager = [UIImage imageWithCGImage:[[asset defaultRepresentation] fullScreenImage] scale:0.5 orientation:UIImageOrientationUp];
     UIImageView*imageView=[[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 90, 90)];
     NSData *imageData;
     imageData=UIImageJPEGRepresentation(copyOfOriginalImager, 0.4);
     [imageView setImage:[UIImage imageWithData:imageData]];
  [cell.contentView addSubview:imageView];
  }
        failureBlock:^(NSError *error)
  {
     // error handling
     NSLog(@"failure-----");
    }];
  return cell;
  }

```

I am facing many problems in iOS 7 , app crash due to memory pressure , please explain that too