NSMutableArray: is it faster to delete all objects or run a new NSMutableArray?

Although this has minimal impact on my code right now, I would like to understand if the operation is more expensive than the other :-).

+6
source share
1 answer

Faster to delete all objects. The workaround about NSMutableArray extends its internal list when it runs out of capacity.

Take a look at this post.

+7
source

Source: https://habr.com/ru/post/913609/


All Articles