On Sep 23, 2011, at 1:04 PM, Charles Srstka wrote: > What does +[NSObject alloc] do when the process is out of memory, anyway? > Does it throw an exception, or just return nil? The docs don’t seem to > mention either way.
It attempts to throw an exception (though it may have done otherwise in the past). However, the Objective-C runtime and exception machinery may need to allocate memory during that path, and they will simply crash if they can't get it. In practice, you should expect any non-trivial framework to crash if it runs out of virtual address space. -- Greg Parker gpar...@apple.com Runtime Wrangler _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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/archive%40mail-archive.com This email sent to arch...@mail-archive.com