mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-26 07:50:34 +05:00
Bug 0020403: Clear mesh data doen't 'free' the memory.
This commit is contained in:
parent
df30a6d6f6
commit
874fdebf62
@ -1891,7 +1891,6 @@ void SMDS_Mesh::DebugStats() const
|
||||
const SMDS_MeshElement *me = it->next();
|
||||
sizeofnodes += sizeof(me);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
SMDS_FaceIteratorPtr itface=facesIterator();
|
||||
@ -1899,8 +1898,8 @@ void SMDS_Mesh::DebugStats() const
|
||||
{
|
||||
const SMDS_MeshElement *face = itface->next();
|
||||
sizeoffaces += sizeof(*face);
|
||||
|
||||
}
|
||||
|
||||
MESSAGE("total size of node elements = " << sizeofnodes);;
|
||||
MESSAGE("total size of face elements = " << sizeoffaces);;
|
||||
|
||||
@ -2038,6 +2037,7 @@ void SMDS_Mesh::Clear()
|
||||
myNodeIDFactory->Clear();
|
||||
myElementIDFactory->Clear();
|
||||
}
|
||||
|
||||
SMDS_VolumeIteratorPtr itv = volumesIterator();
|
||||
while (itv->more())
|
||||
delete itv->next();
|
||||
@ -2129,33 +2129,6 @@ void SMDS_Mesh::setInverseElements(bool b)
|
||||
myHasInverseElements=b;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Return an iterator on nodes of the current mesh factory
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class SMDS_Mesh_MyNodeIterator:public SMDS_NodeIterator
|
||||
{
|
||||
SMDS_ElemIteratorPtr myIterator;
|
||||
public:
|
||||
SMDS_Mesh_MyNodeIterator(const SMDS_ElemIteratorPtr& it):myIterator(it)
|
||||
{}
|
||||
|
||||
bool more()
|
||||
{
|
||||
return myIterator->more();
|
||||
}
|
||||
|
||||
const SMDS_MeshNode* next()
|
||||
{
|
||||
return static_cast<const SMDS_MeshNode*>(myIterator->next());
|
||||
}
|
||||
};
|
||||
|
||||
SMDS_NodeIteratorPtr SMDS_Mesh::nodesIterator() const
|
||||
{
|
||||
return SMDS_NodeIteratorPtr
|
||||
(new SMDS_Mesh_MyNodeIterator(myNodeIDFactory->elementsIterator()));
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///Iterator on NCollection_Map
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@ -2185,6 +2158,19 @@ struct MYNCollection_Map_Iterator: public FATHER
|
||||
}
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Return an iterator on nodes of the current mesh factory
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
SMDS_NodeIteratorPtr SMDS_Mesh::nodesIterator() const
|
||||
{
|
||||
//return SMDS_NodeIteratorPtr
|
||||
// (new SMDS_Mesh_MyNodeIterator(myNodeIDFactory->elementsIterator()));
|
||||
typedef MYNCollection_Map_Iterator
|
||||
< SetOfNodes, const SMDS_MeshNode*, SMDS_NodeIterator > TIterator;
|
||||
return SMDS_NodeIteratorPtr(new TIterator(myNodes));
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///Return an iterator on 0D elements of the current mesh.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user