• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: @property (readonly, retain) ???
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >@property (readonly, retain) ??? (From: "Optical Ali" <email@hidden>)

  • Prev by Date: Re: Sending an image to Preview to preview the image
  • Next by Date: Re: -draggingEntered: never gets called [solved?]
  • Previous by thread: Re: @property (readonly, retain) ???
  • Next by thread: Sending an image to Preview to preview the image
  • Index(es):
    • Date
    • Thread