On Feb 26, 2009, at 6:10 AM, Peter N Lewis wrote:
The next issue (and this is almost certainly where your problem is)
is that your @property is set to copy, so:
[self.currentStates addObject:@"hello"];
is equivalent:
[[self currentStates] addObject:@"hello"];
And [self currentStates] returns a copy of the NSMutableArray. And
so you create a copy, then you add the string, then it is
autoreleased.
No, this is wrong.
'copy' applies to the setter, not getter.
<http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/Articles/chapter_5_section_3.html#//apple_ref/doc/uid/TP30001163-CH17-SW2
>
mmalc
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com