• 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: alloc init thread safe?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: alloc init thread safe?


  • Subject: Re: alloc init thread safe?
  • From: mmalc crawford <email@hidden>
  • Date: Thu, 8 Mar 2007 12:42:11 -0800


On Mar 8, 2007, at 12:28 PM, email@hidden wrote:

These latter two objects seem to try to access the alloc init method at the same time.

It's not clear what you mean by "the alloc init method".
alloc and init are separate methods.

id object = [[Class2 alloc] init];

is akin to

id object = [Class2 alloc];
object = [object init];

Note in particular that the object returned by init may be different from the original receiver. This is an especially important consideration if you are using a class cluster...

mmalc

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: alloc init thread safe?
      • From: David Carlisle <email@hidden>
References: 
 >alloc init thread safe? (From: email@hidden)
 >Re: alloc init thread safe? (From: Chris Suter <email@hidden>)
 >Re: alloc init thread safe? (From: David Carlisle <email@hidden>)
 >Re: alloc init thread safe? (From: "Shawn Erickson" <email@hidden>)
 >Re: alloc init thread safe? (From: David Carlisle <email@hidden>)
 >Re: alloc init thread safe? (From: Bill Bumgarner <email@hidden>)
 >Re: alloc init thread safe? (From: David Carlisle <email@hidden>)
 >Re: alloc init thread safe? (From: Bill Bumgarner <email@hidden>)
 >Re: alloc init thread safe? (From: David Carlisle <email@hidden>)
 >Re: alloc init thread safe? (From: email@hidden)

  • Prev by Date: Re: alloc init thread safe?
  • Next by Date: Re: alloc init thread safe?
  • Previous by thread: Re: alloc init thread safe?
  • Next by thread: Re: alloc init thread safe?
  • Index(es):
    • Date
    • Thread