• 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
CALayer and Memory Management
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CALayer and Memory Management


  • Subject: CALayer and Memory Management
  • From: Dimitri Bouniol <email@hidden>
  • Date: Sun, 14 Dec 2008 17:08:06 -0800

I'm at a loss when it comes to releasing CALayers. Since you can only create a layer with [CALayer layer] (docs advise not to use [[CALayer alloc] init]), I would assume that the instance is automatically qutoreleased. However, after looking through apple's sample code on a menu built with core animation, the layers were autoreleased in the dealloc method (this doesn't work too well if the layers aren't instance variables). Additionally, when I tried releasing the layers after I was done with them (after I added them to a superlayer), sometimes it would freak out and crash, and other times it wouldn't mind.
Basically, here's my question: When (if ever) are you supposed to (auto)release CALayers?
--
定魅刀利
Dimitri Bouniol
email@hidden
http://www.appkainime.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


  • Follow-Ups:
    • Re: CALayer and Memory Management
      • From: David Duncan <email@hidden>
  • Prev by Date: Re: Text track in QTMovie
  • Next by Date: Re: controlTextDidChange for UITextField?
  • Previous by thread: Re: Text track in QTMovie
  • Next by thread: Re: CALayer and Memory Management
  • Index(es):
    • Date
    • Thread