FROM : Jeff LaMarche
DATE : Wed May 21 21:58:23 2008
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.
DATE : Wed May 21 21:58:23 2008
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 mail archive

