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
dimitri...@mac.com
http://www.appkainime.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

Reply via email to