> On May 11, 2016, at 2:31 AM, Jonathan Taylor <jonathan.tay...@glasgow.ac.uk> 
> 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 (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to