From Gill Peacegood, "fix for a memory leak in the DelaunayConstraint class"

This commit is contained in:
Robert Osfield 2013-06-28 14:21:43 +00:00
parent 4493cc817d
commit 2e41e3f656
2 changed files with 10 additions and 1 deletions

View File

@ -95,7 +95,7 @@ public:
void handleOverlaps(void);
protected:
virtual ~DelaunayConstraint() {}
virtual ~DelaunayConstraint();
typedef std::vector< int* > trilist; // array of indices in points array defining triangles

View File

@ -1372,4 +1372,13 @@ void DelaunayConstraint::handleOverlaps(void)
tscx->retessellatePolygons(*this); // find all edges
}
DelaunayConstraint::~DelaunayConstraint()
{
trilist::const_iterator ti;
for (ti=_interiorTris.begin(); ti!=_interiorTris.end(); ++ti)
{
delete[] *ti;
}
}
} // namespace osgutil