Welcome, Guest. Please login or register.
Did you miss your activation email?
July 27, 2016, 06:30:02 AM
Home Help Search chat Login Register 
News: Read this please.The Great Kangaroo Escape Looking for reviews of the 4th ed on Amazon!   Twitter:  @skochan

+ Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
|-+ Programming in Objective-C, 4th edition
| |-+ Chapter 18
| | |-+ The copy attribute
Pages: [1] Go Down
Author Topic: The copy attribute (Read 2615 times)
Posts: 12

on: May 28, 2012, 12:15:35 PM

I can't understand how the "copy" attribute works.
In particular Kochan writes:
"Using the copy attribute, even with a mutable instance variable, will result in the copyWithZone: method being executed which, as mentioned, produces an immutable copy of the object by convention"

But in Address Book programs we didn't implement the copyWithZone method up until this chapter.
So why did we use the "copy" attribute in programs like 15.12 or 15.11?
The copy created (because of the "copy" attribute) when calling the setter of the instance variable is a deep or shallow copy?

I hope it will raise a discussion from this questions

Pages: [1] Go Up
Jump to:

Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Entire forum contents (c) 2009 classroomM.com. All rights reserved.