Re: @property (readonly, retain) ???
Re: @property (readonly, retain) ???
- Subject: Re: @property (readonly, retain) ???
- From: Bill Bumgarner <email@hidden>
- Date: Tue, 06 May 2008 15:59:37 -0700
On May 6, 2008, at 2:14 PM, Optical Ali wrote:
What does it mean to to have both readonly and retain in property
declaration?
My understanding is that retain is for assignment.
If your property is truly readonly, then retain is largely irrelevant.
However, you can also make a readonly property readwrite in a class
extension and then use @synthesize to create both the setter/getter
methods automatically, at which point "retain" is rather critical.
Retain seems like an implementation detail, but it really isn't.
Switching between retain, copy and assign has a significant potential
impact on clients, thus they are exposed in the interface.
b.bum
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden