That should work well enough
[NSMutableArray arrayWithArray:myArray]
In addition, the copy method probably does the same.
[myArray copy]
But a simple assignment will not clone anything. Since you only assign the link (your parameter probably looks like NSMutableArray *myArray , which means myArray is the link).
Nikita Rybak
source share