Re: Objective-C default initialization
Re: Objective-C default initialization
- Subject: Re: Objective-C default initialization
- From: Ryan Brown <email@hidden>
- Date: Fri, 11 Jul 2008 17:18:03 -0700
In other words, if you have a simple class like this:
@interface MyClass : NSObject {
id obj;
}
@end
Then when -init is called is 'obj' *guaranteed*, always, in all
versions of OS X, to be nil?
Yes:
http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Tasks/AllocInitObjects.html#/
/apple_ref/doc/uid/20000048-1003201
Although it happens on alloc/allocWithZone/etc, not init.
Ryan
_______________________________________________
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