Search code examples
openglmemory-managementdrivers

Not deleting texture memory in opengl


Possible Duplicate:
Deleting textures in opengl

If I have texture memory allocated on the graphic card and I choose not to delete it when the application exits, can I rely on the opengl drivers/operating system to delete it for me?


Solution

  • OpenGL resources are frees implicitly once all contexts with access to them are destroyed. OpenGL contexts of a process get destroyed when the client terminates; however in the case of indirect GLX context objects may be shared among X11 clients, so they may be freed only after the last client with access to them terminates.

    Nevertheless it's always a good practice to clean up after yourself.

    Note : From datenwolf.(Not from me)