On Mon, Apr 11, 2011 at 5:03 AM, steven Hooley <steven.hoo...@gmail.com> wrote: >>> I know its not very popular, but I've disciplined myself to set all >>> variables (including stack) to their low or unused state when finished >>> with them. It helps locate reuse problems in Debug builds (and I >>> really don't care a bit about the 3 cycles). The optimizer can remove >>> it later if it desires. > >> Sure, setting the variable to nil in dealloc is good practice, just either >> do it with >> [foo release]; >> foo = nil; > > How is it good practice? The only thing that this can get you is > masking a bug. Don't do it. I believe it is a good idea in general, other folks do not. There's a small cottage industry based on pointer reuse: http://www.google.com/#sclient=psy&hl=en&site=&source=hp&q=adobe+site:securityfocus.com _______________________________________________
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 arch...@mail-archive.com