I am developing an application which requires loading of more than 1 million entries through infinite scrolling in a tableview. Each time request will be sent for 1000 entries and once data is downloaded and parsed through JSON library the table is reloaded. I have implemented this through CoreData with "setFetchBatchSize = 1000". 

```
StreamModal *modal = [[StreamModal alloc]init];
              StreamModal *modal = [NSEntityDescription insertNewObjectForEntityForName:@"StreamModal" inManagedObjectContext:managedObjectContext];
                 if([self isNotNull:[streamDataDict objectForKey:@"_id"]])
                     modal.stream_id               = [streamDataDict objectForKey:@"_id"];

-(void)reloaData{
@try {
    NSError *error;
    if (![[self fetchedResultsController] performFetch:&error]) {
        // Update to handle the error appropriately.
        NSLog(@"Unresolved error %@, %@", error, [error userInfo]);
        exit(-1);  // Fail
    }
    NSLog(@"ferchresults count %d",[[_fetchedResultsController fetchedObjects]count]);
}
@catch (NSException *exception) {
    NSLog(@"exception raised in reloadData in streamViewController class %@",exception);
}
@finally {

}
}

- (NSFetchedResultsController *)fetchedResultsController {

if (_fetchedResultsController != nil) {
    return _fetchedResultsController;
}

NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init];
NSEntityDescription *entity = [NSEntityDescription entityForName:@"StreamModal" inManagedObjectContext:appDelegate.managedObjectContext];
[fetchRequest setEntity:entity];

NSSortDescriptor *sort = [[NSSortDescriptor alloc] initWithKey:@"date" ascending:NO];
[fetchRequest setSortDescriptors:[NSArray arrayWithObject:sort]];

[fetchRequest setFetchBatchSize:1000];
//[fetchRequest setFetchLimit:2000];

NSFetchedResultsController *theFetchedResultsController = [[NSFetchedResultsController alloc] initWithFetchRequest:fetchRequest managedObjectContext:appDelegate.managedObjectContext sectionNameKeyPath:nil cacheName:nil];
self.fetchedResultsController = theFetchedResultsController;
_fetchedResultsController.delegate = self;

fetchRequest = nil;
theFetchedResultsController = nil;

return _fetchedResultsController;    

}

```

Here is the code i am using, when ever connectionfinishedloading data i am populating the data into NSManagedObject Class(StreamModal) and then calling reload data.Here the problem is the app is getting memory exceptions after i loaded 12000 entries in table and getting crashed. how can i load all entries without memory exception. i am new to CoreData concepts and have read the core data concepts through developer guide, but i didn't find any info related to memory handling. Please help me.