KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Why doesn't this common property initialization scheme risk failure when the synthesized setter tries to release the undefined myArray object? Or are property objects automatically initialized to nil and I don't need to be doing this at all? @interface myClass : NSObject { NSArray* myArray; } @property (nonatomic, retain) NSArray* myArray; @end @implementation myClass @synthesize myArray; -(id)init { if ( self = [super init] ) { self.myArray = nil; } return self; } ...
Tags (comma-separated)
Save Edits
Cancel