open list
As stated in the Apple Documentation, unshare consistent with ensuring that the copy of the array is unique , so when you call unshare you get a non-shared copy of the array, it could be the same array if it is the only reference to the array.
Copy
On the other hand, copy forcibly copies the array and returns a new array containing the copied elements .
So, if you want to have 2 independent copies of the array, you must use copy in another case, you can use unsare to ensure that the array has no other references.
pconcepcion
source share