Recently I’m working on project which requires a large no. of object should be added to an NSMutableArray.
I’m little bit confusing how much object we can add in NSMutableArray..?
Thanks in advance.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It’s probably all dependent on memory. Older generation devices get a smaller share of RAM (memory) to use than newer devices for the apps they run. Therefore, the limit is probably lower on older devices than newer ones. That said, it probably can’t be pinpointed to a specific number (unless I am mistaken).
Rather, what you should try to do is figure out if you can handle memory better here so you’re not worried about a size limit 🙂
EDIT
From Steffen Itterheim’s “Learn Cocos2D Game Development With iOS 5”, based on the installed memory of a device, here are some rough estimates of the amount of memory apps can expect to work with:
128MB Installed => 35-40MB available, memory warnings at 20-25MB;
256MB Installed => 120-150MB available, mem warning at 80-90MB;
512 MB Installed => 340-370MB available, mem warning at 260-300MB.
Of course these are rough estimates, but depending on the device you can obviously see that the size of an NSMutableArray depends on the available memory