Re:Objective-C Memory Management For Lazy People
by msbarnett on Thursday December 09, 2010 @04:11AM
(#1986716)
Not necessarily. If you want to avoid situations where title points at a mutable subclass, yes, but if that isn't a concern, there's nothing inherently incorrect with a simple retain.
Re:Objective-C Memory Management For Lazy People
by jckarter on Thursday December 09, 2010 @05:16AM
(#1986869)
"copy"ing an immutable string just retains it, so there's little benefit to using a retain property for NSString properties, or for properties of the other NSMutableCopying type families. As a best practice you should always use copy properties for them.
Why is he retaining NSString? Shouldn't that be (copy)?