• 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: Memory leak when setting CALayer name
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Memory leak when setting CALayer name
      • From: Gustavo Pizano <email@hidden>
References: 
 >Memory leak when setting CALayer name (From: Gustavo Pizano <email@hidden>)

  • Prev by Date: Memory leak when setting CALayer name
  • Next by Date: Re: Memory leak when setting CALayer name
  • Previous by thread: Memory leak when setting CALayer name
  • Next by thread: Re: Memory leak when setting CALayer name
  • Index(es):
    • Date
    • Thread