Mailing Lists: Apple Mailing Lists

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

Context Memory Leak



While leak testing my application with MallocDebug yesterday, I noticed that aglCreateContext was leaking 656 bytes after a context was destroyed.

To verify that I wasn't doing something silly on my own, I downloaded the sample app GLCarbonAGLWindow and did a leak check after closing a window, and sure enough the 656 byte leak was there too.

The stack trace for the leak looks like this from the top down:

aglCreateContext
CGLCreateContext
cglInitializeContext
(4 more anonymous functions)
malloc

I filed a bug report (radar # 3868287).

And this morning I saw that 10.3.6 was out, so after installing that, I checked again. Now MallocDebug reports a larger leak, 784 bytes now, each time a context is created/destroyed.

No big deal for a fullscreen game or something where only a handful of contexts are created/destroyed during the life of an app, but a potential problem for those of us with long-lived document-based apps using OpenGL.

I've seen this leak on both machines I've tried: Dual 2.0 G5 with Radeon 9600 (10.3.5), and 1.25 Powerbook with Radeon 9600 (10.3.5 and 10.3.6). Unfortunately, I don't have anything older than 10.3.5 so I don't know how far back this goes.

Is anyone else seeing this or am I doing something wrong that I've been missing all this time?

Thanks!

Justin G.
--
OCS Software Development Group
http://sdg.ocs.ou.edu/

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

This email sent to 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.