I have a render cycle looking like this: import model -> draw it (some frames…) -> delete it. To draw the model I’m using vao/vbo/ebo.
Now, in a delete stage with this code:
glDeleteVertexArrays(1, &vao); glDeleteBuffers(1, &vbo); glDeleteBuffers(1, &ebo);
while profiling in Xcode Allocation instrument, I get this:
whereas if the code is written like:
glDeleteBuffers(1, &vbo); glDeleteBuffers(1, &ebo); glDeleteVertexArrays(1, &vao);
suddenly it shows:
Why is this happening? I change nothing but the order of glDeleteVAO / glDeleteBuffers and getting this strange ‘memory leaks’. All these 3 lines of code are placed in the dctor and are not distributed across the app.
Also, glIsBuffer() after deleting vbo, vao, ebo returns 0 in all these cases on all buffers.
using opengl 4.1 on os x el capitan