I have huge开发者_Go百科 array with NSobjects. While storing to file iPad is getting memory issues. I want to store each object in file one by one and again read it back. Any suggestions?
I would recommend Core Data. It handles all the heavy lifting in regards to memory.
http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CoreData/cdProgrammingGuide.html
http://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/CoreData/CoreData.pdf
Alternatively if Core Data feels a little heavy you could implement the NSCoding protocol.
Apple provide a code example here
精彩评论