On Sun, Apr 13, 2008 at 12:36 PM, stephen joseph butler
<[EMAIL PROTECTED]> wrote:
> On Sun, Apr 13, 2008 at 12:48 PM, Ferhat Ayaz <[EMAIL PROTECTED]> wrote:
>
>  > why is it necessary to set the variable appointments (for instance) to nil
>  > in this example? Should we do this for each variable? When have we to do
>  > this?
>
>
>  Usually it's not. For me, it's 100% a "best practices" thing. It never
>  hurts, so why not get into the habit of doing it?

Because it doesn't help either. I have never run into a situation
where setting an instance variable to nil in a -dealloc has provided
any benefit. At best, it does nothing, and at worst, it masks other
errors in your code.

The only way that it could ever affect your code is if you are
accessing an ivar of an already-dealloc'ed object; in which case
setting the ivar to nil only hides this problem.






-- 
Clark S. Cox III
[EMAIL PROTECTED]
_______________________________________________

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