Re: Leaking CGColor objects
Re: Leaking CGColor objects
- Subject: Re: Leaking CGColor objects
- From: Antonio Nunes <email@hidden>
- Date: Sun, 26 Oct 2008 15:20:41 +0000
On 26 Oct 2008, at 14:25, DKJ wrote:
1. Is there such a thing as a CGColor class? I don't see it in the
documentation; but "CGColor" is what Instruments lists as the leaked
objects.
You are creating CGColor objects to which you receive pointers of type
CGColorRef. You are at C level here, not Objective-C.
2. Are the CGColor objects being leaked when I remove MyCALayer
objects from myArray? Should I set foregroundColor to nil when doing
this?
You need to make sure in the MyCALayer dealloc method to release the
color you created during init using something like
CGColorRelease(self.foregroundColor).
-António
-----------------------------------------
Accepting others as they are
brings a wonderful freedom
to your own mind.
--The Peace Formula
-----------------------------------------
_______________________________________________
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