On 22 Jun 2011, at 11:10 AM, Joanna Carter wrote:

>> My book is about iOS 4; there is no GC in that world! ☺
> 
> Aha! Missed that bit <embarrassed>
> 
> But was I finally right?

Consider the multi-threaded case where you want property access to be atomic 
(and remember, properties might not always be objects).

You still would like to take advantage of the locking behavior the @synthesized 
getter/setter pair offers you rather than writing it yourself.

The accessor synthesis doesn't just get you retain counting. Labeling and 
@property with the 'atomic' specifier can help in writing thread-safe accessors 
as well.

.chris


_______________________________________________

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

Reply via email to