#include <Utils_ExceptHandlers.hxx>
#include <Utils_CorbaException.hxx>
#include <SALOMEDS_wrap.hxx>
+#include <SALOME_GenericObj_i.hh>
#include <BRepAdaptor_Surface.hxx>
#include <BRep_Tool.hxx>
SMESH_MeshEditor_i::~SMESH_MeshEditor_i()
{
- deleteAuxIDSources();
+ //deleteAuxIDSources();
delete myPreviewMesh; myPreviewMesh = 0;
delete myPreviewEditor; myPreviewEditor = 0;
}
//=======================================================================
//function : MakeIDSource
-//purpose : Wrap a sequence of ids in a SMESH_IDSource
+//purpose : Wrap a sequence of ids in a SMESH_IDSource.
+// Call UnRegister() as you fininsh using it!!
//=======================================================================
-struct SMESH_MeshEditor_i::_IDSource : public POA_SMESH::SMESH_IDSource
+struct SMESH_MeshEditor_i::_IDSource : public virtual POA_SMESH::SMESH_IDSource,
+ public virtual SALOME::GenericObj_i
{
SMESH::long_array _ids;
SMESH::ElementType _type;
SMESH::SMESH_IDSource_ptr SMESH_MeshEditor_i::MakeIDSource(const SMESH::long_array& ids,
SMESH::ElementType type)
{
- if ( myAuxIDSources.size() > 10 ) {
- delete myAuxIDSources.front();
- myAuxIDSources.pop_front();
- }
+ // if ( myAuxIDSources.size() > 10 ) {
+ // delete myAuxIDSources.front();
+ // myAuxIDSources.pop_front();
+ // }
_IDSource* idSrc = new _IDSource;
idSrc->_mesh = myMesh_i->_this();
idSrc->_ids = ids;
idSrc->_type = type;
- myAuxIDSources.push_back( idSrc );
+ //myAuxIDSources.push_back( idSrc );
SMESH::SMESH_IDSource_var anIDSourceVar = idSrc->_this();
return 0;
}
-void SMESH_MeshEditor_i::deleteAuxIDSources()
-{
- std::list< _IDSource* >::iterator idSrcIt = myAuxIDSources.begin();
- for ( ; idSrcIt != myAuxIDSources.end(); ++idSrcIt )
- delete *idSrcIt;
- myAuxIDSources.clear();
-}
+// void SMESH_MeshEditor_i::deleteAuxIDSources()
+// {
+// std::list< _IDSource* >::iterator idSrcIt = myAuxIDSources.begin();
+// for ( ; idSrcIt != myAuxIDSources.end(); ++idSrcIt )
+// delete *idSrcIt;
+// myAuxIDSources.clear();
+// }
//=============================================================================
/*!