Objective-C default initialization
Objective-C default initialization
- Subject: Objective-C default initialization
- From: Greg <email@hidden>
- Date: Fri, 11 Jul 2008 20:10:53 -0400
I've noticed that objects get initialized to nil if you don't set
them, is this guaranteed in objective-c?
I've been trying to find documentation from Apple on this but have
been unable.
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?
Thanks,
- Greg
_______________________________________________
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