• 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: Protecting against "app nap"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Protecting against "app nap"


  • Subject: Re: Protecting against "app nap"
  • From: Jens Alfke <email@hidden>
  • Date: Wed, 11 May 2016 08:10:53 -0700

> On May 11, 2016, at 2:31 AM, Jonathan Taylor <email@hidden> wrote:
>
> I guess I just found method naming a bit odd (not really referring to an object at all), and might have expected it to have an ‘alloc/new’ naming since I’d have thought the API would be almost exclusively used for activities that continue beyond the calling scope.

The only methods named +alloc or +new are the core methods on NSObject that instantiate objects. (There’s also -copy and -mutableCopy.) Regular methods don’t use that naming scheme nor return owned references, they just consistently return unowned references. That keeps the rules simpler.

(And I really recommend using ARC! It saves trouble and eliminates a lot of bugs, like this one.)

—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


  • Follow-Ups:
    • Re: ARC [was Protecting against "app nap"]
      • From: Jonathan Taylor <email@hidden>
References: 
 >Protecting against "app nap" (From: Jonathan Taylor <email@hidden>)
 >Re: Protecting against "app nap" (From: Jens Alfke <email@hidden>)
 >Re: Protecting against "app nap" (From: Jonathan Taylor <email@hidden>)

  • Prev by Date: Re: Protecting against "app nap"
  • Next by Date: Re: UIImagePickerController in popover broken on iOS 9
  • Previous by thread: Re: Protecting against "app nap"
  • Next by thread: Re: ARC [was Protecting against "app nap"]
  • Index(es):
    • Date
    • Thread