On May 21, 2008, at 3:37 PM, Johnny Lundy wrote:

I submit that any experienced programmer looking up and turning to a page entitled "NSArray Class Reference" would "expect" that a behavior of the class that results in one's created object being deallocated out from under him would be documented in such a "Reference."

Not an experienced developer who has read and understood the conceptual guide here:

http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/MemoryMgmt.html

or more specifically, the rules here:

http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Tasks/MemoryManagementRules.html

While it wouldn't be a bad idea for the NSArray class reference to explicitly document that it returns an autoreleased object, but in absence of explicit documentation otherwise, you should follow the simple, documented memory management rules of the language/framework you are using. If you don't know them, that is not the documentation's fault.
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to