Difference between Deep and shallow copy — Hi, I Am Baibhav Singh


First see some Examples: newArary = oldArray isn’t a copy at all. You end up with two pointers pointing to the exact same array. newArray = [NSMutableArray arrayWithArray:oldArray]; is a shallow copy. In 2nd example, does a shallow copy of the array, meaning the individual objects are NOT copied. Shallow Copies: When you create […]

via Difference between Deep and shallow copy — Hi, I Am Baibhav Singh

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s