I think I get most of the memory stuff but...
I think I get most of the memory stuff but...
- Subject: I think I get most of the memory stuff but...
- From: Theodore Petrosky <email@hidden>
- Date: Sun, 4 May 2003 18:41:18 -0700 (PDT)
These conversations on memory management are useful
but one issue has never been discussed. why do I have
to retain a passed in value.
in a common setter....
-(void)setClientCode:(NSString *) aString {
[aString retain];
[clientCode release];
clientCode=aString;
}
I assume that aString is a convenience construct that
is autoreleased. Why do I have to retain it? Why
doesn't it live through the method? I finally
understand the autorelease mechanics. I just do get
why I need to retain aString.
Ted
__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.