I'm still pretty new to Objective-C coding (as evidenced by this question), and I think I don't quite understand how the use of the save attribute in the @property declaration works.
Here is an example class:
@interface Foo : NSObject { NSMutableArray *myArray; } @property (retain) NSMutableArray *myArray;
My understanding was that adding a save attribute to the @property declaration (and using the necessary @synthesize decryption in the implementation file) will basically do the following settings and getter for me:
- (void)setMyArray:(NSMutableArray *)newArray { myArray = [[NSMutableArray alloc] initWithArray:newArray]; [newArray release]; } - (NSMutableArray *)myArray { return myArray; }
Is this accurate or am I mistaken how the save attribute works?
objective-c
cpjolicoeur Dec 30 '09 at 14:34 2009-12-30 14:34
source share