Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What happens if I fail to delete a Vertex Buffer Object when my program quits?

Tags:

opengl

vbo

In all the documents and tutorials I've read about Vertex Buffer Objects the authors all make a point of mentioning that you must delete you VBO before an application quits.

In the case that a program crashes or is killed in a way that the program can't delete the VBO what happens to the VBO? Does it persist in the GPU RAM until the computer is rebooted or does the GPU eventually recover the memory occupied by the VBO?

like image 827
slayton Avatar asked Oct 12 '11 20:10

slayton


1 Answers

The OpenGL implementation will clean up any objects left unallocated. That doesn't mean that you should just leave them lying around, but you don't need to take measures to ensure that objects are destroyed in the event of exceptional circumstances (ie: crashing).

like image 171
Nicol Bolas Avatar answered Sep 22 '22 14:09

Nicol Bolas