• 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: Subclassing NSControl and inheritance of target, action properties
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Subclassing NSControl and inheritance of target, action properties


  • Subject: Re: Subclassing NSControl and inheritance of target, action properties
  • From: Quincey Morris <email@hidden>
  • Date: Fri, 30 Jan 2015 05:53:32 +0000

On Jan 29, 2015, at 21:16 , Ken Thomases <email@hidden> wrote:
>
> the getter has to do the equivalent of retain+autorelease atomically

I was thinking that the same would have to be true of local variable accesses, too, but I see (if I see) the difference is that references from local variables are already retained per-thread, not just per-object.

But now I don’t see how the autorelease got in there. If the getter does the retain atomically, then surely it can do the release at its leisure?

The other thing that’s getting in the way is that it seems to me that the retain-count *increment* needs to be done atomically, independently of whether the retain as a whole is atomic. Otherwise, multi-thread read-only access to a variable wouldn’t be safe outside of atomic properties.

_______________________________________________

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


  • Follow-Ups:
    • Re: Subclassing NSControl and inheritance of target, action properties
      • From: Ken Thomases <email@hidden>
References: 
 >Subclassing NSControl and inheritance of target, action properties (From: Graham Cox <email@hidden>)
 >Re: Subclassing NSControl and inheritance of target, action properties (From: Roland King <email@hidden>)
 >Re: Subclassing NSControl and inheritance of target, action properties (From: Graham Cox <email@hidden>)
 >Re: Subclassing NSControl and inheritance of target, action properties (From: Quincey Morris <email@hidden>)
 >Re: Subclassing NSControl and inheritance of target, action properties (From: Roland King <email@hidden>)
 >Re: Subclassing NSControl and inheritance of target, action properties (From: Quincey Morris <email@hidden>)
 >Re: Subclassing NSControl and inheritance of target, action properties (From: Greg Parker <email@hidden>)
 >Re: Subclassing NSControl and inheritance of target, action properties (From: Quincey Morris <email@hidden>)
 >Re: Subclassing NSControl and inheritance of target, action properties (From: Ken Thomases <email@hidden>)

  • Prev by Date: copyWithZone archive/unarchive
  • Next by Date: Re: Subclassing NSControl and inheritance of target, action properties
  • Previous by thread: Re: Subclassing NSControl and inheritance of target, action properties
  • Next by thread: Re: Subclassing NSControl and inheritance of target, action properties
  • Index(es):
    • Date
    • Thread