Re: Does setFormatter() retain?
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