• 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: Rosyna <email@hidden>
  • Date: Fri, 9 Mar 2007 09:18:35 -0700

The chances of [Class alloc] returning NULL due to memory exhaustion are EXTREMELY slim. Mac OS X doesn't handle memory space exhaustion in applications very well and often just crashes the application instead of returning an error.

And even if you can detect it, you can't do anything about it because you are out of memory.

So this is not a case you need to be concerned with.


Ack, at 3/9/07, David Carlisle said:

So is there a style of usage of [Class alloc] that will detect the craziness when memory runs out and it returns nil? I'm just realizing that putting "if ( self=[super init] )" into my init methods won't solve that problem.

--


Sincerely, Rosyna Keller Technical Support/Carbon troll/Always needs a hug

Unsanity: Unsane Tools for Insanely Great People

It's either this, or imagining Phil Schiller in a thong.
_______________________________________________

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


References: 
 >Re: alloc init thread safe? (From: James Bucanek <email@hidden>)
 >Re: alloc init thread safe? (From: David Carlisle <email@hidden>)

  • Prev by Date: Re: alloc init thread safe?
  • Next by Date: Re: a HUGE Core Data bug
  • Previous by thread: Re: alloc init thread safe?
  • Next by thread: Re: alloc init thread safe?
  • Index(es):
    • Date
    • Thread