Fixed memory leak associated with VertexArrayStte objects not getting released on destruction of Geometry/Drawables.

This commit is contained in:
Robert Osfield
2018-08-16 19:23:17 +01:00
parent ed13576d03
commit 3808b298d1
2 changed files with 24 additions and 9 deletions

View File

@@ -82,10 +82,7 @@ Geometry::Geometry(const Geometry& geometry,const CopyOp& copyop):
Geometry::~Geometry()
{
// do dirty here to keep the getGLObjectSizeHint() estimate on the ball
dirtyGLObjects();
// no need to delete, all automatically handled by ref_ptr :-)
Geometry::releaseGLObjects();
}
#define ARRAY_NOT_EMPTY(array) (array!=0 && array->getNumElements()!=0)