Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CARenderer Memory Issue




On Mar 23, 2008, at 11:49 PM, Colin Cornaby wrote:

I am successfully rendering a layer tree that is never shown on the screen with a CARenderer. I set up a pixel buffer, and then render to the pixel buffer. But, when I call [CATransaction commit] before I actually do the rendering, there is a very large allocation of memory depending on the size of the image. Apparently glClear is being called internally by CoreAnimation, and I'm guessing it's allocating some sort of buffer internal to CoreAnimation. I can't figure out how to get CoreAnimation to let go of it, and it exists for the lifetime of my program.

From the backtrace you provided below, it looks like the allocation is made by OpenGL when _you_ called glClear in your program. Maybe it's the depth buffer that is being allocated the first time you draw into the surface? (You probably don't need the depth buffer, CA definitely doesn't use it.)


The stack trace from where the memory is allocated:
 0 libSystem.B.dylib malloc
 1  0x179b1e3c
 2  0x179a37d8
 3  0x179a6af1
 4 libGL.dylib glClear
 5 MyProgram -[GSOGLLayerRenderer imageByRenderingLayers:] /Users/....
 6 MyProgram -[GSImageExporterController prepareImage] /Users/....
...

John


_______________________________________________ Do not post admin requests to the list. They will be ignored. Quartz-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/quartz-dev/email@hidden

This email sent to email@hidden
References: 
 >CARenderer Memory Issue (From: Colin Cornaby <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.