• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How To Increment CALayer Retain Count?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >RE: How To Increment CALayer Retain Count? (From: steven Hooley <email@hidden>)

  • Prev by Date: RE: How To Increment CALayer Retain Count?
  • Next by Date: Determine Error from Webview loadRequest
  • Previous by thread: RE: How To Increment CALayer Retain Count?
  • Next by thread: Re: Two Applications Sharing Same Core Data Database
  • Index(es):
    • Date
    • Thread