• 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: Does setFormatter() retain?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Does setFormatter() retain?


  • Subject: Re: Does setFormatter() retain?
  • From: Andreas Falkenhahn <email@hidden>
  • Date: Wed, 24 Aug 2016 22:37:49 +0200

On 24.08.2016 at 22:25 Jens Alfke wrote:



> On Aug 24, 2016, at 1:04 PM, Andreas Falkenhahn <email@hidden> wrote:

> Now, will "setFormatter" call retain on "formatter" or not? Looking
> at "retainCount" seems to suggest so, although I know that this
> isn't reliable and shouldn't be done at all...



> These days, with ARC, we call those “strong references” vs. “weak” or “unretained” references.


> Strong (retained) references are the default for properties. There
> are a few cases in system frameworks where a property is weak or
> unretained — usually this is used for delegates or data sources, to
> avoid reference cycles that can lead to memory leaks. In this case
> the docs should call out the style of the reference. If there’s no
> mention of it, you can assume it’s strong.

Thanks, this would make "setFormatter" a case of strong reference because
it isn't documented otherwise...

--
Best regards,
 Andreas Falkenhahn                            mailto:email@hidden


_______________________________________________

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: Does setFormatter() retain?
      • From: Quincey Morris <email@hidden>
References: 
 >Does setFormatter() retain? (From: Andreas Falkenhahn <email@hidden>)
 >Re: Does setFormatter() retain? (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Does setFormatter() retain?
  • Next by Date: Re: Does setFormatter() retain?
  • Previous by thread: Re: Does setFormatter() retain?
  • Next by thread: Re: Does setFormatter() retain?
  • Index(es):
    • Date
    • Thread