In an interface such as this:
@interface MyClass : NSObject
{
bool PlainOldBool;
}
@end
... does PlainOldBool
get auto-in
Also worth noting is that if you're doing Objective-C++, C++ objects that are ivars of Objective-C objects are not initalized : their constructors are not called by default.
Yes (unless your false is not 0). The default +alloc
/+allocWithZone:
method will automatically zero out all ivars.
From https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/CocoaFundamentals/CocoaObjects/CocoaObjects.html#//apple_ref/doc/uid/TP40002974-CH4-SW17
- It initializes all other instance variables to zero (or to the equivalent type for zero, such as
nil
,NULL
, and0.0
).