Multiple contexts in the main thread: why and when use them?
I'm looking for a simple answer that could highlight rules for using (or avoiding) multiple contexts within the same thread (the main one in my case). Usually, in Core Data, I set up a single main context that is used throughout the application. Then, if I need to perform some background work, I create a context for each background operation I run. Such an approach is valid most of the time. Core Data manages the memory in a perfect manner. But I can also decide to purge some of the object graph (managing the memory footprint) explicitly. Here, I can rely on - (void)refreshObject: