Re: [Foo new] vs [[Foo alloc] init]:
Re: [Foo new] vs [[Foo alloc] init]:
- Subject: Re: [Foo new] vs [[Foo alloc] init]:
- From: Jonathan Dann <email@hidden>
- Date: Sat, 16 Feb 2008 23:55:18 +0000
[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:
This email sent to email@hidden