Re: Does setFormatter() retain?
Re: Does setFormatter() retain?
- Subject: Re: Does setFormatter() retain?
- From: Jens Alfke <email@hidden>
- Date: Wed, 24 Aug 2016 13:25:09 -0700
> 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.
—Jens
_______________________________________________
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