does copyWithZone on an NSArray call copyWithZone on its elements too?
Posted
by malik
on Stack Overflow
See other posts from Stack Overflow
or by malik
Published on 2010-04-29T11:23:49Z
Indexed on
2010/04/29
11:27 UTC
Read the original article
Hit count: 257
cocoa
Hi, here's the scenario, I have this array of Person
objects. copyWithZone
is implemented on Person
and works as expected.
I have an array of Person
objects, however when I create a copy of the array and modify things in original array (change attributes of a Person
) it chances the copy as well. So my best guess is that when I call copyWithZone
on NSArray
, it does not call it on its elements. Please confirm.
© Stack Overflow or respective owner