I use Core Data to store lists of data. So, there are parent objects with any number of child objects. Core Data does a great job of preserving my memory when I insert objects and read, but when I do a delete operation, the memory goes up.
When I delete a parent with ~ 5000 children, cascading deletion uses ~ 10 MB. It scales linearly, so one in 10,000 uses 20 MB. As far as I can tell, it reads the entire graphic object in memory before deleting it. I assume this is to ensure data integrity and validity, but I really need to use less memory.
Does anyone know how to get Core Data to use less memory when deleting cascades? Or do I need to cascade manually to reduce memory usage?
source share