Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Foo new] vs [[Foo alloc] init]:



[sorry forgot to post to the list]

On 16 Feb 2008, at 23:28, Bill Bumgarner wrote:

I just checked all the way back to 10.1. The implementation was +allocWithZone: NULL followed by -init until Leopard, when it moved to +alloc followed by -init.

If the behavior had changed to anything that avoided either of those methods (keeping in mind that +alloc is a cover for +allocWithZone: until the latter was effectively deprecated as zones have fallen out of recommended practice),

So in Leopard, as you say zones have fallen out of recommended practice, does that still mean that +alloc calls +allocWithZone: or is there a new implementation of +alloc? If not then +new involves 1 more message call than +alloc -init, and could cause a slight performance loss with the extra call? Could this performance hit ever be seen, realistically speaking?


Jon
_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.