Re: NSEnumerator retaining objects?
Re: NSEnumerator retaining objects?
- Subject: Re: NSEnumerator retaining objects?
- From: Marco Scheurer <email@hidden>
- Date: Wed, 9 Mar 2005 18:57:15 +0100
On Mar 09, 2005, at 17:17PM, j o a r wrote:
I don't think that Marco commented on the use of reference counting
for memory management in general.
That's right. I'm perfectly happy with the reference counting mechanism
of Cocoa. But there is a school that says that every accessors should
return retained and autoreleased accessors:
- (NSString *) title
{
return [[title retain] autorelease];
}
instead of:
- (NSString *) title
{
return title;
}
Note that this is not necessarily what NSArray's enumerator does: I
don't know how it is implemented. It was not my intention to reignite
that debate, a look in the archives should give you all the arguments.
marco
Marco Scheurer
Sen:te, Lausanne, Switzerland http://www.sente.ch
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden