On Nov 17, 2008, at 1:18 AM, Kyle Sluder wrote:
On Mon, Nov 17, 2008 at 1:03 AM, Stephen J. Butler
<[EMAIL PROTECTED]> wrote:
2) always use the value returned from an init* method.

This isn't strictly necessary.  If you need a singleton object that
lives for the duration of your app, for example, there's no reason you
can't just alloc/init one and let it go (unless, of course, you're
using garbage collection, in which case it might matter).  I can't
imagine a likely scenario for this outside of misapplication of an
idiom, but that doesn't make it illegal to ignore the return value of
-init.

I *think* Stephen meant we should use the value returned by the initializer as opposed to the value returned by alloc, not as opposed to ignoring it altogether.

--Andy


_______________________________________________

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