> On 24 Aug 2016, at 1:04 pm, Andreas Falkenhahn <[email protected]> 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 protected])

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to