开发者

Storing NSObjects in file

开发者 https://www.devze.com 2023-03-05 16:28 出处:网络
I have huge开发者_Go百科 array with NSobjects. While storing to file iPad is getting memory issues.

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

0

精彩评论

暂无评论...
验证码 换一张
取 消