Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any limit to add object in NSMutableArray..?

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.

like image 392
R_RKumawat Avatar asked Mar 09 '26 12:03

R_RKumawat


1 Answers

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

like image 90
anon_dev1234 Avatar answered Mar 11 '26 00:03

anon_dev1234



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!