Re: Does setFormatter() retain?
Re: Does setFormatter() retain?
- Subject: Re: Does setFormatter() retain?
- From: Quincey Morris <email@hidden>
- Date: Wed, 24 Aug 2016 13:50:09 -0700
- Feedback-id: 167118m:167118agrif8a:167118sBHqvYzGeI:SMTPCORP
On Aug 24, 2016, at 13:37 , Andreas Falkenhahn <email@hidden> wrote:
>
> Thanks, this would make "setFormatter" a case of strong reference because
> it isn't documented otherwise...
To expand on what Jens said, slightly…
You’d need to check the docs for the version of the SDK you’re using. In a few cases, the ownership behavior has changed over time since 10.6. However, it’s very difficult to find docs specifically for older SDKs, so look in the SDK header files used in your project directly.
If the property is defined via @property, then there’s an API contract about ownership (strong, weak, etc). If unspecified, the default is “strong”. There’s no ambiguity in this case.
If the property setter is defined as an actual “set…” method, then you can assume it retains the value unless there’s a comment saying otherwise.
_______________________________________________
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