Who manage texture memory?


When we get texture handle from OpenGL API(like glGenTextures, glBindTexture, etc), who release these memory allocated for texture when we exit our application?

OpenGL video card like nVidia automatically release these memory background?

If you know, I hope any comments.

Sorry, my broken English.

The nice thing to do is to call glDeleteTextures when your application closes, but the textures are “owned” by the opengl context so when that is closed the textures will be deleted… (with a little luck…)


Thank you very mach for your reply.

I recalled glDeleteTextures()!
(My old code called glDeleteTextures()…)

I ashamed of having asked such a thing!

I’m very glad to see your advaice.
Thank you very much.

I’ll enjoy happy coding