CoreData: numberOfObjects in Section incorrect
问题 I'm using CoreData in an iOS app to save a simple list of location objects (name, coordinates). I've run into a situation twice now, after a memory warning, when the CoreData records appear to become corrupt. Specifically, (in tableView:numberOfRowsInSection:) NSUInteger numObjects = [[[fetchedResultsController sections] objectAtIndex:section] numberOfObjects]; returns 4 for section == 0. Then (in tableView:cellForRowAtIndexPath:) aLocation = [fetchedResultsController objectAtIndexPath