Re: Seeking comments: an Objective-C reference card for Java programmers
Re: Seeking comments: an Objective-C reference card for Java programmers
- Subject: Re: Seeking comments: an Objective-C reference card for Java programmers
- From: Ken Ferry <email@hidden>
- Date: Tue, 30 Nov 2004 15:58:23 -0500
On Sat, 27 Nov 2004 15:51:47 -0800, Dylan McNamee <email@hidden> wrote:
>
> If anyone finds it useful, that's great.
>
> I'd also appreciate any feedback / errata / suggestions for improvement.
> I do want to keep it to one side of one page, though.
>
> Here's the file: http://www.mecodegoodsomeday.com/ObjectiveCRef.pdf
Looks very useful!
You could clarify the use of autorelease. Maybe show that the
principal use is to return an object without transferring ownership to
the calling function.
The current text,
"autorelease performs a release at some point in the future after the
current stack frame is exited"
doesn't make it clear that the object will survive being returned.
Of course it's hard to compose clear, concise text. How about,
"Only methods that start with init, new, copy or retain return objects
that have to be released by the caller. To return an object that
doesn't need releasing, it's often useful to send the object the
autorelease message. Autorelease works like a deferred release."
-Ken
_______________________________________________
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