• 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: Should I retain a variable returned from this accessor?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Should I retain a variable returned from this accessor?


  • Subject: Re: Should I retain a variable returned from this accessor?
  • From: "Shawn Erickson" <email@hidden>
  • Date: Tue, 12 Aug 2008 12:36:20 -0700

On Tue, Aug 12, 2008 at 2:12 AM, Negm-Awad Amin <email@hidden> wrote:
>
> BTW: You can do the same inside a getter to get rid of thread problems.

Nope it does nothing to solve threading issues ([[blah retain]
autorelease] isn't an atomic operation) you need to protect it with an
critical section of some type. Additionally adding locking at the
level of accessor is often far to granular to be useful to clients of
a class.

-Shawn
_______________________________________________

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: Should I retain a variable returned from this accessor?
      • From: Negm-Awad Amin <email@hidden>
References: 
 >Should I retain a variable returned from this accessor? (From: Sean DeNigris <email@hidden>)
 >Re: Should I retain a variable returned from this accessor? (From: "Kyle Sluder" <email@hidden>)
 >Re: Should I retain a variable returned from this accessor? (From: Negm-Awad Amin <email@hidden>)

  • Prev by Date: Re: Monospaced Simulated Braille
  • Next by Date: Re: Monospaced Simulated Braille
  • Previous by thread: Re: Should I retain a variable returned from this accessor?
  • Next by thread: Re: Should I retain a variable returned from this accessor?
  • Index(es):
    • Date
    • Thread