Corrected a bug which could happen because of memory not released.

This commit is contained in:
giorgiomarcias 2014-03-14 14:56:17 +00:00
parent 833cc12e38
commit 7a9b33fcc5
1 changed files with 5 additions and 0 deletions

View File

@ -959,6 +959,11 @@ public:
FaceIterator firstAddedFaceIt = vcg::tri::Allocator<PolyMeshType>::AddFaces(mesh, FN, facesToUpdate);
// add vertices to the mesh
VertexIterator firstAddedVertexIt = vcg::tri::Allocator<PolyMeshType>::AddVertices(mesh, VN, verticesToUpdate);
// delete the added starting position's face and vertex pointers
facesToUpdate.pop_back();
verticesToUpdate.pop_back();
// allocate and initialize 4 vertices and ffAdj for each new face
for (FaceIterator fIt = firstAddedFaceIt; fIt != mesh.face.end(); fIt++) {
fIt->Alloc(4);