Re: Memory Management
Re: Memory Management
- Subject: Re: Memory Management
- From: Martin Häcker <email@hidden>
- Date: Mon, 28 Jul 2003 02:20:37 +0200
Question: Is there a preferred method? And does one method cause
problems is used?
Yes, their is a preferred method:
--- snip ---
- (NSString *)name
{
return [[_name retain] autorelease];
}
- (void)setName:(NSString *)newName
{
[newName retain];
[_name release];
_name = newName;
}
--- snap ---
To read more about this, have a look at:
<
http://www.stepwise.com/Articles/Technical/2002-06-11.01.html/>
cu Martin
--
dont.wanna.tell
[ot]coder - hehe
_______________________________________________
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.