added Trimesh destructor to purge unremoved PerVertex[PerFace]Attribute
This commit is contained in:
parent
69a35e8912
commit
1f929ed8f4
|
@ -24,6 +24,9 @@
|
|||
History
|
||||
|
||||
$Log: not supported by cvs2svn $
|
||||
Revision 1.33 2008/05/15 16:32:27 ganovelli
|
||||
PerVertexAttribute and PerFaceAttribute added to Trimesh
|
||||
|
||||
Revision 1.32 2008/04/15 10:34:07 cignoni
|
||||
added HasPerVertexTexCoord ( mesh )
|
||||
|
||||
|
@ -247,6 +250,16 @@ public:
|
|||
imark = 0;
|
||||
}
|
||||
|
||||
/// destructor
|
||||
~TriMesh()
|
||||
{
|
||||
std::set< HandlesWrapper>::iterator i;
|
||||
for( i = vert_attr.begin(); i != vert_attr.end(); ++i)
|
||||
delete ((SimpleTempDataBase<VertContainer>*)(*i)._handle);
|
||||
for( i = face_attr.begin(); i != face_attr.end(); ++i)
|
||||
delete ((SimpleTempDataBase<FaceContainer>*)(*i)._handle);
|
||||
}
|
||||
|
||||
inline int MemUsed() const
|
||||
{
|
||||
return sizeof(MeshType)+sizeof(VertexType)*vert.size()+sizeof(FaceType)*face.size();
|
||||
|
|
Loading…
Reference in New Issue