Re: Memory leak when setting CALayer name
Re: Memory leak when setting CALayer name
- Subject: Re: Memory leak when setting CALayer name
- From: Filip van der Meeren <email@hidden>
- Date: Sun, 22 Mar 2009 11:50:02 +0100
If you create a layer with a factory method, then the layer will be
released automatically by an NSAutoreleasePool. I suggest you read the
rules on Memory Management for Objective-C.
I think that the cause of your leak is also in the trend of not
knowing the MemoryManagement rules/ not applying them correctly.
Filip van der Meeren
email@hidden
http://sourceforge.net/projects/xlinterpreter
On 22 Mar 2009, at 10:57, Gustavo Pizano wrote:
Hello, Im having a leak, (showed up by instruments), I was able to
detect that its appearing when doing this:
[dLayer setName:[[shipaux class]description]];
and I have 4 more layers where Im doing that procedure.
After doing a drag and drop Im just removing the CALayer from the
superlayer, but I dunno then how to release it, if I created them as
following:
dLayer = [CALayer layer];
cLayer = [CALayer layer];
sLayer = [CALayer layer];
fLayer = [CALayer layer];
aLayer = [CALayer layer];
if I call release on any of them, the program crash.
how can I solve this situation.. its like the leak its not big, its
a NSString x 5, 32Bytes each, but I like my program to be leaks free.
Thanks a lot.
Gustavo Pizano
_______________________________________________
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
_______________________________________________
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