@interface List : NSObject { NSString *_name; } -(void)setName:(NSString *)name; -(NSString *)name; @end
@implementation List -(void)setName:(NSString *)name { if (_name!=name) { [_name release]; _name=[name retain]; } } -(NSString *)name { return _name; } @end