Re: How To Increment CALayer Retain Count?
Re: How To Increment CALayer Retain Count?
- Subject: Re: How To Increment CALayer Retain Count?
- From: Jeffrey Walton <email@hidden>
- Date: Mon, 11 Apr 2011 06:21:45 -0400
On Mon, Apr 11, 2011 at 5:03 AM, steven Hooley <email@hidden> 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 (email@hidden)
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:
This email sent to email@hidden