Memory leak fixes from Joseph Steel.

This commit is contained in:
Robert Osfield
2003-05-08 14:02:50 +00:00
parent 173a09fb32
commit 876e40802e

View File

@@ -27,7 +27,7 @@ Tesselator::Tesselator()
Tesselator::~Tesselator()
{
if (_tobj) gluDeleteTess(_tobj);
reset();
}
void Tesselator::beginTesselation()
@@ -97,9 +97,12 @@ void Tesselator::reset()
gluDeleteTess(_tobj);
_tobj = 0;
}
_primList.clear();
for (Vec3dList::iterator i = _coordData.begin(); i != _coordData.end(); ++i) {
delete (*i);
}
_coordData.clear();
_newVertexList.clear();
_primList.clear();
_errorCode = 0;
}