• 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: [Foo new] vs [[Foo alloc] init]:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: [Foo new] vs [[Foo alloc] init]:
      • From: Keith Duncan <email@hidden>
    • Re: [Foo new] vs [[Foo alloc] init]:
      • From: Bill Bumgarner <email@hidden>
  • Prev by Date: re: CoreData Performance Mystery
  • Next by Date: Re: @property problem
  • Previous by thread: Re: [Foo new] vs [[Foo alloc] init]:
  • Next by thread: Re: [Foo new] vs [[Foo alloc] init]:
  • Index(es):
    • Date
    • Thread