question about retain/release
question about retain/release
- Subject: question about retain/release
- From: Thierry Bucco <email@hidden>
- Date: Mon, 22 Dec 2003 18:46:07 +0100
Hi evereybody,
I have a little question.
I am reading some documentations about management
(
http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/
Concepts/ObjectOwnership.html#//apple_ref/doc/uid/20000043/1000580).
There is a setter function like this one :
- (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 ?
Thanks.
thierry
_______________________________________________
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.