Even though this has minimal impact on my code right now I would like to understand if an operation is more costly than the other :-).
Share
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 faster to remove all objects. The costly thing about a NSMutableArray is extending it’s internal list when it runs out of capacity.
Have a look at this blog post.