• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Does setFormatter() retain?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Does setFormatter() retain?
      • From: Andreas Falkenhahn <email@hidden>
References: 
 >Does setFormatter() retain? (From: Andreas Falkenhahn <email@hidden>)

  • Prev by Date: Does setFormatter() retain?
  • Next by Date: Re: Core Graphics: Is it better to up-sample or down-sample images when drawing into a rect?
  • Previous by thread: Does setFormatter() retain?
  • Next by thread: Re: Does setFormatter() retain?
  • Index(es):
    • Date
    • Thread