I'm using Core Data to store lists of data. So, there's parent objects with any number of child objects. Core Data does a great job keeping my memory use low while I'm inserting objects and reading but when I do a delete operation the memory spikes way up.
When I delete a parent object with ~5000 children the cascade delete uses ~10MB. This scales linearly so one with 10,000 uses 20MB. As near as I can tell, it's reading into memory the entire object graph before it does the delete. I'm guessing this is to ensure data integrity and validity but I really need it to use less memory.
Does anyone know how to get Core Data to use less memory on cascade deletes? Or do I have to do the cascade manually to decrease the memory usages?