> On 27 Jul 2016, at 12:18 PM, Graham Cox <graham....@bigpond.com> wrote:
> 
> The atomic setter method probably looks something like this:


A further thought. If the getter method is also protected, like:

- (NSImageRep*) imageRep
{
        @synchronized( self )
        {
                return [[_imageRep retain] autorelease];
        }
}


Then you’ll also be safe.

I have no idea if this is what synthesized atomic getters look like though.

—Graham



_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to