Re: question about retain/release
Re: question about retain/release
- Subject: Re: question about retain/release
- From: mmalcolm crawford <email@hidden>
- Date: Mon, 22 Dec 2003 11:14:48 -0800
On Dec 22, 2003, at 9:46 AM, Thierry Bucco wrote:
- (void) setTitle: (NSString*) newTitle
{
if (newTitle != title)
{
[title release];
title = [newtitle retain];
}
}
In several documentation I have read that I have to release every
object I allocate, copy or retain.
So, why newTitle isn't released on this example ?
See the various other articles on memory management listed at:
<
http://www.alastairs-place.net/cocoa/faq.txt>
mmalc
_______________________________________________
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.