Re: Does setFormatter() retain?
Re: Does setFormatter() retain?
- Subject: Re: Does setFormatter() retain?
- From: Ben Kennedy <email@hidden>
- Date: Wed, 24 Aug 2016 13:14:46 -0700
> On 24 Aug 2016, at 1:04 pm, Andreas Falkenhahn <email@hidden> wrote:
>
> I have read Apple's memory management guide on retain/release and
> I think I've basically got it, but there's just one thing that
> I'm not confident about and that is "setXXX" methods which accept an
> NSObject parameter and I don't know how I can know whether the
> "setXXX" retains or not.
Why do you think you need to know? That's the concern of the API you're calling. If it needs to retain the object you're passing it, then it will. If it doesn't, it won't.
The legacy delegate stuff that you cited calls out the fact that they don't because it is contrary to normal expectations, and thus requires explicit concern by the caller.
-ben
_______________________________________________
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