Re: Autorelease Question
Re: Autorelease Question
- Subject: Re: Autorelease Question
- From: mmalcolm crawford <email@hidden>
- Date: Fri, 21 Nov 2008 07:44:09 -0800
On Nov 21, 2008, at 7:33 AM, Filip van der Meeren wrote:
Ok, so my point with all this is that the documentation should not
say that all class factory methods always return autoreleased
objects because that is an implementation detail that (a) is not
required by the memory management rules, (b) is something that the
programmer should not care about, and (c) is not even true in the
case of some methods, including [NSString string]
So I'll file a bug.
You will file a bug ?
I really do not see the bug here...
I do, and I already filed a bug.
Cocoa Fundamentals Guide states:
Class Factory Methods
"Class factory methods are implemented by a class as a convenience for
clients. They combine allocation and initialization in one step and
return the created object autoreleased. These methods are of the form
+ (type)className... (where className excludes any prefix)."
<http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals/CocoaObjects/chapter_3_section_6.html
>
It should probably not explicitly state "autoreleased" — it should
simply state that — in accordance with standard memory management
rules, in a reference counted environment — the receiver does not own
the returned object.
mmalc
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden