views:

49

answers:

1

Does it turn some managed objects into faults when there's a Low Memory Warning? Or must we do that manually by calling the -refreshObjects:mergeChanges: method which puts the affected managed objects on diet quickly? And...would that actually hurt? What if these objects are currently used by an NSFetchedResultsController to show up on a table view?

+2  A: 

Yes, Core Data listens for low memory warnings and will drop its cache and attempt to fault any object that it can to reduce its memory consumption.

If the object is currently being used it would automatically realize that object the next time you accessed on of its properties so from your application's point of view, nothing has happened and no NSManagedObject entities have been released.

Marcus S. Zarra
Say I have a feed that has many items. Will it fault all of the items if I am using the feed when a memory warning occurs?
Sam Soffes
Yes it will fault everything that it can and as soon as you use one of them it will bring it back in transparently.
Marcus S. Zarra