On Apr 18, 2008, at 1:16 AM, Graham Cox wrote:

Here's a simple example:

- (void) dealloc
{
   [someIvar release];
   [super dealloc];
}



is <someIvar> really initialised? Maybe it's nil? Do I care at this point? no - either way, the code is correct - if the object was made, it's released, if it wasn't, it's a no-op. Exactly what you want.

That makes a lot of sense. I can now picture many lines of code I've written over the years which wouldn't have been necessary with this feature.

Thanks a lot to everyone who responded to my question. I now understand the pros and cons of the nil-eats-messages feature much better, and it doesn't seem like a mis-feature to me now.

Adam

_______________________________________________

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