• 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: Leak when animating Core Animation Superlayer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Leak when animating Core Animation Superlayer


  • Subject: Re: Leak when animating Core Animation Superlayer
  • From: Brian Christensen <email@hidden>
  • Date: Sun, 1 Jun 2008 08:40:28 -0400

On Jun 1, 2008, at 5:03 , Stéphane Droux wrote:

I've changed the timer function to do random animations and this time it
really "leaks":


- (void) fromTimer: (NSTimer *) t
{
l2.frame = CGRectMake((double)random() / RAND_MAX*30, (double)random() /
RAND_MAX*30, (double)random() / RAND_MAX*40, (double)random() /
RAND_MAX*40);
l1.opacity = (double)random() / RAND_MAX;
}



I ran it in Object alloc and can see a trend of increasing memory usage :
the memory usage keeps changing up and down but the general trend is up and
it doubled after a minute or so.


Could that be caused by some kind of caching in  Core Animation ?
If it is, is there a way to flush the cache ?

Even with this new code I'm still not observing any leaking. Are you using garbage collection? With GC enabled you will observe fluctuations until the collector gets a chance to free up unused memory, but even then after a few minutes or so the usage level should periodically return to a reduced level.


I am not privy to the caching Core Animation is doing internally, but also keep in mind that it maintains both presentation and model layers behind the scenes, in addition to whatever internal caching might be happening to improve performance.

What kind of hardware are you running? I suspect we may be seeing some differences in our results based on that (perhaps different graphics hardware is causing Core Animation to have to do more - or different - work on your machine). I still don't see why this would be leaking on your machine though.

/brian

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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: Leak when animating Core Animation Superlayer
      • From: "Stéphane Droux" <email@hidden>
References: 
 >Re: Leak when animating Core Animation Superlayer (From: Brian Christensen <email@hidden>)
 >Re: Leak when animating Core Animation Superlayer (From: "Stéphane Droux" <email@hidden>)

  • Prev by Date: Re: runloops and NSURLConnection
  • Next by Date: how to implement ETA
  • Previous by thread: Re: Leak when animating Core Animation Superlayer
  • Next by thread: Re: Leak when animating Core Animation Superlayer
  • Index(es):
    • Date
    • Thread