Theocacao
Leopard
Design Element
Comment on "New Objective-C Tutorial"
by Joe — May 25
Ok, so

retain increments the reference count of an object every time it's called. And including it as an attribute in the property declaration is the equivalent of
[[caption setCaption:newCaption]retain];
so retain is called every time the setter is called?

And copy is another way to create an object and would look like
newObject = [oldObject copy];
and the new object comes with a reference count of 1?
Back to "New Objective-C Tutorial"
Design Element

Copyright © Scott Stevenson 2004-2015