I\'m now stuck for about two weeks with a nasty Core Data problem. I read lots of blogpost, articles and SO questions/answers but I\'m still not able to solve my problem.
<
For every NSManagedObjectContext
that you keep around for a specific purpose you are going to accumulate instances of NSManagedObject
A NSManagedObjectContext
is just a piece of scratch note paper that you can instantiate at will and save if you wish to keep changes in the NSPersistentStore
and then discard afterward.
For the parsing operations (layer 3) try creating a MOC for the op , do your parsing, save the MOC and then discard it afterwards.
It feels like you have at least one layer of MOC being held in strong references too many.
Basically ask the question for each of the MOC's. "Why am keeping this object and its associated children alive".