On Sun, Apr 13, 2008 at 2:52 PM, j o a r <[EMAIL PROTECTED]> wrote: > Two reasons: > > * I don't think that it can be described as a best practice to begin with, > and > > * You could end up hiding what I would consider to be real problems in > your code. > > I want to detect real problems as soon as possible. Messaging deallocated > objects, or objects that are in the process of being deallocated, is > typically an error. The longer time you're unaware of something like this > happening in your app, the more expensive it will be to fix it once it > becomes a more serious problem.
Well, in C/C++ accessing a NULL pointer will throw an error. But that type of error is much safer than the alternates: double free or accessing a freed region. Those aren't just programming problems, but security concerns. Now, messaging nil in Obj-C is a pretty common thing; whether it's intentional or not. But I think the security issues are still there with double free or messaging a dealloced object. _______________________________________________ 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]