Hi Stephen,
Don't I need to override dealloc and release name in this short program
#import <Foundation/Foundation.h>
@interface test: NSObject
{
NSString *name;
}
@property (nonatomic, copy) NSString *name;
@end
@implementation test
@synthesize name;
@end
int main (int argc, const char * argv[])
{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
test *myTest = [[test alloc] init];
NSMutableString *myString = [NSMutableString stringWithString:@"hello"];
myTest.name = myString;
[myString appendString:@"goodbye"];
NSLog(@"myString = %@",myString);
NSLog(@"name = %@",[myTest name]);
[myTest release];
[pool drain];
return 0;
}
Any help is appreciated
Cheers
David