Re: "Ownership follows the 'Create' Rule'" - not literally
Re: "Ownership follows the 'Create' Rule'" - not literally
- Subject: Re: "Ownership follows the 'Create' Rule'" - not literally
- From: Quincey Morris <email@hidden>
- Date: Fri, 23 Aug 2013 23:08:28 -0700
On Aug 23, 2013, at 21:13 , Jerry Krinock <email@hidden> wrote:
> Lesson: When documentation says that "Ownership follows the 'Create Rule'" for a parameter, what they really mean to say is that "When applying the 'Create Rule' to this function, proceed as though this function had 'Create' in its name".
That's not quite the right thing to take away. The name indicates the ownership policy only of the function return value. Parameters returning objects by reference need their own (explicit) documentation of ownership policy, which could be different from that of the return value.
> Or, more succinctly, "You own this object".
Exactly.
_______________________________________________
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