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?
by Joe — May 25
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?