Basically I do something like this:
GenerateLinePoly(Contour[i].DrawingPoints, Contour[i].Outline.OutlineWidth);
Contour[i].Outline.OutlineSize = OutlineVec.size() / 2;
glBindBufferARB(GL_ARRAY_BUFFER_ARB,Contour[i].Outline.OutlineVBO);
glBufferDataARB(GL_ARRAY_BUFFER_ARB,sizeof(GLfloat) * OutlineVec.size(),
&OutlineVec[0],GL_DYNAMIC_COPY_ARB);
in my class constructor I do GlGenBuffers for all of these and I guarantee that I use GlDeleteBuffersARB in the deconstructor.
The system memory usage goes up as expected. But after destroying the object the memory occupied by thebuffers remains. I don't think this is a memory leak. I call GlDeleteBuffers and it doesn't clear all the memory it uses. Is that normal behavior? What could cause this?
If I only do:
GenerateLinePoly(Contour[i].DrawingPoints, Contour[i].Outline.OutlineWidth);
Contour[i].Outline.OutlineSize = OutlineVec.size() / 2;
Then my memory is managed perfectly as I would expect.
Thanks