How do I remove CoreData objects from memory?

I am using CoreData to store image data that the user took from an iPhone Camera. Over time, the memory consumed by these objects continues to grow, but I don't know how to clear these objects from memory.

How to do it?

+2


source to share


1 answer


You can say that managedObjectContext does or does not save objects (in addition to the ones you save):

[managedObjectContext setRetainsRegisteredObjects:YES];

      

See http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/index.html?http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/Articles/cdRelationships.html for a discussion of that what does it do.



Note that you also have to be careful not to save or lose objects yourself, or this will have no effect.

-Wil

+6


source







All Articles