How does Core Data determine if an NSObjects data can be dropped?

Posted by Kevin on Stack Overflow See other posts from Stack Overflow or by Kevin
Published on 2010-05-09T10:10:18Z Indexed on 2010/05/09 10:18 UTC
Read the original article Hit count: 189

Filed under:
|
|

In the app I am working on now I was storing about 500 images in Core Data. I have since pulled those images out and store them in the file system now, but in the process I found that the app would crash on the device if I had an array of 500 objects with image data in them. An array with 500 object ids with the image data in those objects worked fine. The 500 objects without the image data also worked fine. I found that I got the best performance with both an array of object ids and image data stored on the filesystem instead of in core data.

The conclusion I came to was that if I had an object in an array that told Core Data I was "using" that object and Core Data would hold on to the data. Is this correct?

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about core-data