Free Memory on exit...

I think I’m getting a memory leak with OpenGl.

I know I’m freeing my textures.
I’m using glut with the glutGameMode

when I hit the escape key, I exit the game mode and call exit(0)

After about 5 or 6 runs of my programs, my resources (out of 256 megs of ram) are usually about 2 percent…

Am I not properlly exiting?
Any suggestions…

(This happens with just a couple of textured quads)

In normal cases should the texture objects be released if the program terminates without problems. I do not know if this is true with GLUT.

You can always freeing your textures in the code so the only reasonable explanation in your case is that you do not release all.