This may sound as a simple question for many, I am trying to understand more about how CoreData manage objects, and I encountered this in the documentation:
The managed object context acts as a scratchpad. You can create and
register managed objects with it, make changes to the objects, and
undo and redo changes as you wish. If you make changes to managed
objects associated with a given context, those changes remain local to
that context until you commit the changes by sending the context a
save: message.
I was wondering what this scratchpad is. I have just run the CoreData profiler and saw that by creating the managed object and later updating its properties, no “Core Data Saves” call to the store is made. So I guess all is kept in memory, if you could just confirm that.
Then, second question, if this is confirmed, are there any best CoreData “memory” practices when dealing with creating and in particular updating of managed objects before saving ?
thanks
1 Answer