I have an array that has 500 objects, each object is nessisary because each one represents another question for my program. My program seems to be taking quite a bit of memory roughly around 50 mb on a iPhone 4. I see that when the array is in use it seems to lag the program a bit. Would an array of this size cause lag when used? Can someone give me an estimate of how much memory this array is using?
I was thinking maybe saving the array to a plist file and using the array from there, would that save memory?
Thanks,
Jacob
First off, we can’t tell you how much memory your array takes because it depends on the objects being stored. However, you can use the Instruments tool (Build -> Profile) to look at that stuff.
Secondly, for 500 objects, I would seriously consider using either SQLite or CoreData for your store.It is highly unlikely that you need all 500 questions in memory at the same time – one or two should probably do it, after all, how many questions can be answered at one time?