c++ - Cleaning Up After OpenGL on iPhone -
Right now, I'm playing with the OpenGL ES on the iPhone using an along engine. This can be a silly question, but how important is it to clear after OpenLL when the app is released? My problem is that I have a static vector that manages the loading model, and with dysfunction it ensures that the models are not filled twice. Because of this, handles all VBs and textures models
objects in a static map & lt; Model & gt;
is stored in. When the app stops, Map Detectors does not call different model objects, so they do not call glDeleteBuffers ()
.
My question is, is it absolutely necessary, if the application is small enough that I am ever loading and reloading models from memory during runtime? Or OpenGL just takes care of everything for me? I can create a stable cleanup ()
function that is called the dealloc
of the application, but is it worth it?
When the actual app exits, all the resources clean with it Which contains all GL content. Do not worry, the OS will not allow your rogue application to accidentally make a bunch of GPU resources.
In general, managing resources in Open GL should definitely do during your app's life, but it seems like how you do it.
Comments
Post a Comment