Right now, I'm playing with OpenGL ES on the iPhone using Oolong Engine. This might be a silly question, but how necessary is it to clean up after OpenGL when the app exits? My problem is that I have a static vector that manages loading models, and loosely ensures that models aren't loaded twice. Because of this, all the handles to the VBOs and textures are stored in Model
objects in a static map<Model>
. When the app closes down, the map doesn't seem to call the destructors on the individual Model objects, so they don't end up calling glDeleteBuffers()
.
My question is, is this entirely necessary, if the application is small enough that I'm never unloading and reloading models from memory during runtime? Or does OpenGL just take care of all that for me? I could make a static CleanUp()
function that gets called from the application's dealloc
, but is that worth it?