Clear Patch for OpenMesh.. free all used memory on mesh clear

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@190 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
Jan Möbius
2009-08-10 10:50:34 +00:00
parent 00613d349b
commit 4c8440de8f
5 changed files with 61 additions and 14 deletions

View File

@@ -257,14 +257,20 @@ void ArrayKernel::garbage_collection(bool _v, bool _e, bool _f)
void ArrayKernel::clear()
{
vertices_.clear();
edges_.clear();
faces_.clear();
vprops_clear();
eprops_clear();
hprops_clear();
fprops_clear();
vertices_.clear();
VertexContainer().swap( vertices_ );
edges_.clear();
EdgeContainer().swap( edges_ );
faces_.clear();
FaceContainer().swap( faces_ );
vprops_resize(0);
eprops_resize(0);
hprops_resize(0);
fprops_resize(0);
}
void ArrayKernel::resize( uint _n_vertices, uint _n_edges, uint _n_faces )