SALOME::GenericObj : Destroy() -> UnRegister()

This commit is contained in:
vsr 2011-03-04 15:42:14 +00:00
parent 5cfaebe1bf
commit ac724740a9
19 changed files with 55 additions and 55 deletions

View File

@ -843,7 +843,7 @@ SMESH_GroupObj::SMESH_GroupObj( SMESH::SMESH_GroupBase_ptr theGroup,
SMESH_GroupObj::~SMESH_GroupObj() SMESH_GroupObj::~SMESH_GroupObj()
{ {
if ( MYDEBUG ) MESSAGE("~SMESH_GroupObj"); if ( MYDEBUG ) MESSAGE("~SMESH_GroupObj");
myGroupServer->Destroy(); myGroupServer->UnRegister();
} }
//================================================================================= //=================================================================================
@ -973,7 +973,7 @@ SMESH_subMeshObj::SMESH_subMeshObj( SMESH::SMESH_subMesh_ptr theSubMesh,
SMESH_subMeshObj::~SMESH_subMeshObj() SMESH_subMeshObj::~SMESH_subMeshObj()
{ {
if ( MYDEBUG ) MESSAGE( "~SMESH_subMeshObj" ); if ( MYDEBUG ) MESSAGE( "~SMESH_subMeshObj" );
mySubMeshServer->Destroy(); mySubMeshServer->UnRegister();
} }
//================================================================================= //=================================================================================

View File

@ -667,7 +667,7 @@ SMESH_Client::SMESH_Client(CORBA::ORB_ptr theORB,
//================================================================================= //=================================================================================
SMESH_Client::~SMESH_Client() SMESH_Client::~SMESH_Client()
{ {
myMeshServer->Destroy(); myMeshServer->UnRegister();
if(!mySMESHDSMesh) if(!mySMESHDSMesh)
delete mySMDSMesh; delete mySMDSMesh;
} }

View File

@ -280,7 +280,7 @@
// obj has been published in study. Its refcount has been incremented. // obj has been published in study. Its refcount has been incremented.
// It is safe to decrement its refcount // It is safe to decrement its refcount
// so that it will be destroyed when the entry in study will be removed // so that it will be destroyed when the entry in study will be removed
aMeshes[i]->Destroy(); aMeshes[i]->UnRegister();
#endif #endif
} }
else { else {
@ -1582,8 +1582,8 @@ LightApp_Module( "SMESH" )
SMESHGUI::~SMESHGUI() SMESHGUI::~SMESHGUI()
{ {
#ifdef WITHGENERICOBJ #ifdef WITHGENERICOBJ
SMESH::GetFilterManager()->Destroy(); SMESH::GetFilterManager()->UnRegister();
SMESH::GetMeasurements()->Destroy(); SMESH::GetMeasurements()->UnRegister();
#endif #endif
SMESH::GetFilterManager() = SMESH::FilterManager::_nil(); SMESH::GetFilterManager() = SMESH::FilterManager::_nil();
SMESH::GetMeasurements() = SMESH::Measurements::_nil(); SMESH::GetMeasurements() = SMESH::Measurements::_nil();

View File

@ -341,7 +341,7 @@ bool SMESHGUI_BuildCompoundDlg::ClickOnApply()
// It is safe to decrement its refcount // It is safe to decrement its refcount
// so that it will be destroyed when the entry in study will be removed // so that it will be destroyed when the entry in study will be removed
if (!CORBA::is_nil(aCompoundMesh)) if (!CORBA::is_nil(aCompoundMesh))
aCompoundMesh->Destroy(); aCompoundMesh->UnRegister();
#endif #endif
return true; return true;

View File

@ -338,7 +338,7 @@ bool SMESHGUI_CopyMeshDlg::ClickOnApply()
// obj has been published in study. Its refcount has been incremented. // obj has been published in study. Its refcount has been incremented.
// It is safe to decrement its refcount // It is safe to decrement its refcount
// so that it will be destroyed when the entry in study will be removed // so that it will be destroyed when the entry in study will be removed
newMesh->Destroy(); newMesh->UnRegister();
#endif #endif
} catch (...) { } catch (...) {
} }

View File

@ -94,7 +94,7 @@ void SMESHGUI_GenericHypothesisCreator::create( bool isAlgo,
SMESH::CreateHypothesis( hypType(), theHypName, isAlgo ); SMESH::CreateHypothesis( hypType(), theHypName, isAlgo );
#ifdef WITHGENERICOBJ #ifdef WITHGENERICOBJ
if (!CORBA::is_nil(anAlgo)) if (!CORBA::is_nil(anAlgo))
anAlgo->Destroy(); anAlgo->UnRegister();
#endif #endif
} }
else { else {
@ -103,7 +103,7 @@ void SMESHGUI_GenericHypothesisCreator::create( bool isAlgo,
editHypothesis( aHypothesis.in(), theHypName, theParent, obj, slot ); editHypothesis( aHypothesis.in(), theHypName, theParent, obj, slot );
#ifdef WITHGENERICOBJ #ifdef WITHGENERICOBJ
if (!CORBA::is_nil(aHypothesis)) if (!CORBA::is_nil(aHypothesis))
aHypothesis->Destroy(); aHypothesis->UnRegister();
#endif #endif
} }
} }
@ -302,7 +302,7 @@ void SMESHGUI_GenericHypothesisCreator::onDialogFinished( int result )
} }
SMESHGUI::GetSMESHGUI()->updateObjBrowser( true, 0 ); SMESHGUI::GetSMESHGUI()->updateObjBrowser( true, 0 );
#ifdef WITHGENERICOBJ #ifdef WITHGENERICOBJ
myHypo->Destroy(); myHypo->UnRegister();
#endif #endif
myHypo = SMESH::SMESH_Hypothesis::_nil(); myHypo = SMESH::SMESH_Hypothesis::_nil();
myInitParamsHypo = SMESH::SMESH_Hypothesis::_nil(); myInitParamsHypo = SMESH::SMESH_Hypothesis::_nil();

View File

@ -351,12 +351,12 @@ bool SMESHGUI_Make2DFrom3DOp::compute2DMesh()
newGrp.out() ); newGrp.out() );
if ( !mesh->_is_nil() ) { if ( !mesh->_is_nil() ) {
#ifdef WITHGENERICOBJ #ifdef WITHGENERICOBJ
mesh->Destroy(); mesh->UnRegister();
#endif #endif
} }
if ( !newGrp->_is_nil() ) { if ( !newGrp->_is_nil() ) {
#ifdef WITHGENERICOBJ #ifdef WITHGENERICOBJ
newGrp->Destroy(); newGrp->UnRegister();
#endif #endif
} }
ok = true; ok = true;

View File

@ -564,7 +564,7 @@ void SMESHGUI_MinDistance::compute()
int precision = SMESHGUI::resourceMgr()->integerValue( "SMESH", "length_precision", 6 ); int precision = SMESHGUI::resourceMgr()->integerValue( "SMESH", "length_precision", 6 );
SMESH::Measurements_var measure = SMESHGUI::GetSMESHGen()->CreateMeasurements(); SMESH::Measurements_var measure = SMESHGUI::GetSMESHGen()->CreateMeasurements();
SMESH::Measure result = measure->MinDistance( s1.in(), s2.in() ); SMESH::Measure result = measure->MinDistance( s1.in(), s2.in() );
measure->Destroy(); measure->UnRegister();
myDX->setText( QString::number( result.minX, precision > 0 ? 'f' : 'g', qAbs( precision ) ) ); myDX->setText( QString::number( result.minX, precision > 0 ? 'f' : 'g', qAbs( precision ) ) );
myDY->setText( QString::number( result.minY, precision > 0 ? 'f' : 'g', qAbs( precision ) ) ); myDY->setText( QString::number( result.minY, precision > 0 ? 'f' : 'g', qAbs( precision ) ) );
myDZ->setText( QString::number( result.minZ, precision > 0 ? 'f' : 'g', qAbs( precision ) ) ); myDZ->setText( QString::number( result.minZ, precision > 0 ? 'f' : 'g', qAbs( precision ) ) );
@ -1043,7 +1043,7 @@ void SMESHGUI_BoundingBox::compute()
int precision = SMESHGUI::resourceMgr()->integerValue( "SMESH", "length_precision", 6 ); int precision = SMESHGUI::resourceMgr()->integerValue( "SMESH", "length_precision", 6 );
SMESH::Measurements_var measure = SMESHGUI::GetSMESHGen()->CreateMeasurements(); SMESH::Measurements_var measure = SMESHGUI::GetSMESHGen()->CreateMeasurements();
SMESH::Measure result = measure->BoundingBox( srcList.in() ); SMESH::Measure result = measure->BoundingBox( srcList.in() );
measure->Destroy(); measure->UnRegister();
myXmin->setText( QString::number( result.minX, precision > 0 ? 'f' : 'g', qAbs( precision ) ) ); myXmin->setText( QString::number( result.minX, precision > 0 ? 'f' : 'g', qAbs( precision ) ) );
myXmax->setText( QString::number( result.maxX, precision > 0 ? 'f' : 'g', qAbs( precision ) ) ); myXmax->setText( QString::number( result.maxX, precision > 0 ? 'f' : 'g', qAbs( precision ) ) );
myDX->setText( QString::number( result.maxX-result.minX, precision > 0 ? 'f' : 'g', qAbs( precision ) ) ); myDX->setText( QString::number( result.maxX-result.minX, precision > 0 ? 'f' : 'g', qAbs( precision ) ) );

View File

@ -1062,7 +1062,7 @@ void SMESHGUI_MeshOp::createHypothesis(const int theDim,
SMESH::CreateHypothesis(theTypeName, aHypName, false); SMESH::CreateHypothesis(theTypeName, aHypName, false);
#ifdef WITHGENERICOBJ #ifdef WITHGENERICOBJ
if (!CORBA::is_nil(aHyp)) if (!CORBA::is_nil(aHyp))
aHyp->Destroy(); aHyp->UnRegister();
#endif #endif
} else { } else {
// Get hypotheses creator client (GUI) // Get hypotheses creator client (GUI)
@ -1138,7 +1138,7 @@ void SMESHGUI_MeshOp::createHypothesis(const int theDim,
SMESH::CreateHypothesis(theTypeName, aHypName, false); SMESH::CreateHypothesis(theTypeName, aHypName, false);
#ifdef WITHGENERICOBJ #ifdef WITHGENERICOBJ
if (!CORBA::is_nil(aHyp)) if (!CORBA::is_nil(aHyp))
aHyp->Destroy(); aHyp->UnRegister();
#endif #endif
} }
} }
@ -1612,7 +1612,7 @@ bool SMESHGUI_MeshOp::createMesh( QString& theMess )
// It is safe to decrement its refcount // It is safe to decrement its refcount
// so that it will be destroyed when the entry in study will be removed // so that it will be destroyed when the entry in study will be removed
if (aMeshSO) if (aMeshSO)
aMeshVar->Destroy(); aMeshVar->UnRegister();
#endif #endif
} }
return true; return true;
@ -1875,7 +1875,7 @@ SMESH::SMESH_Hypothesis_var SMESHGUI_MeshOp::getAlgo( const int theDim )
SMESH::CreateHypothesis(aHypName, aHypName, true); SMESH::CreateHypothesis(aHypName, aHypName, true);
#ifdef WITHGENERICOBJ #ifdef WITHGENERICOBJ
if (!CORBA::is_nil(aHyp)) if (!CORBA::is_nil(aHyp))
aHyp->Destroy(); aHyp->UnRegister();
#endif #endif
} }
else else
@ -1893,7 +1893,7 @@ SMESH::SMESH_Hypothesis_var SMESHGUI_MeshOp::getAlgo( const int theDim )
SMESH::CreateHypothesis(aHypName, aHypName, true); SMESH::CreateHypothesis(aHypName, aHypName, true);
#ifdef WITHGENERICOBJ #ifdef WITHGENERICOBJ
if (!CORBA::is_nil(aHyp)) if (!CORBA::is_nil(aHyp))
aHyp->Destroy(); aHyp->UnRegister();
#endif #endif
} }
} }

View File

@ -453,7 +453,7 @@ bool SMESHGUI_RotationDlg::ClickOnApply()
// obj has been published in study. Its refcount has been incremented. // obj has been published in study. Its refcount has been incremented.
// It is safe to decrement its refcount // It is safe to decrement its refcount
// so that it will be destroyed when the entry in study will be removed // so that it will be destroyed when the entry in study will be removed
mesh->Destroy(); mesh->UnRegister();
#endif #endif
} }
break; break;

View File

@ -504,7 +504,7 @@ bool SMESHGUI_ScaleDlg::ClickOnApply()
// obj has been published in study. Its refcount has been incremented. // obj has been published in study. Its refcount has been incremented.
// It is safe to decrement its refcount // It is safe to decrement its refcount
// so that it will be destroyed when the entry in study will be removed // so that it will be destroyed when the entry in study will be removed
mesh->Destroy(); mesh->UnRegister();
#endif #endif
} }
break; break;

View File

@ -540,7 +540,7 @@ bool SMESHGUI_SymmetryDlg::ClickOnApply()
// obj has been published in study. Its refcount has been incremented. // obj has been published in study. Its refcount has been incremented.
// It is safe to decrement its refcount // It is safe to decrement its refcount
// so that it will be destroyed when the entry in study will be removed // so that it will be destroyed when the entry in study will be removed
mesh->Destroy(); mesh->UnRegister();
#endif #endif
} }
break; break;

View File

@ -526,7 +526,7 @@ bool SMESHGUI_TranslationDlg::ClickOnApply()
// obj has been published in study. Its refcount has been incremented. // obj has been published in study. Its refcount has been incremented.
// It is safe to decrement its refcount // It is safe to decrement its refcount
// so that it will be destroyed when the entry in study will be removed // so that it will be destroyed when the entry in study will be removed
mesh->Destroy(); mesh->UnRegister();
#endif #endif
} }
} }

View File

@ -573,7 +573,7 @@ Functor_i::Functor_i():
Functor_i::~Functor_i() Functor_i::~Functor_i()
{ {
//TPythonDump()<<this<<".Destroy()"; //TPythonDump()<<this<<".UnRegister()";
} }
void Functor_i::SetMesh( SMESH_Mesh_ptr theMesh ) void Functor_i::SetMesh( SMESH_Mesh_ptr theMesh )
@ -1619,7 +1619,7 @@ Comparator_i::Comparator_i():
Comparator_i::~Comparator_i() Comparator_i::~Comparator_i()
{ {
if ( myNumericalFunctor ) if ( myNumericalFunctor )
myNumericalFunctor->Destroy(); myNumericalFunctor->UnRegister();
} }
void Comparator_i::SetMargin( CORBA::Double theValue ) void Comparator_i::SetMargin( CORBA::Double theValue )
@ -1636,7 +1636,7 @@ CORBA::Double Comparator_i::GetMargin()
void Comparator_i::SetNumFunctor( NumericalFunctor_ptr theFunct ) void Comparator_i::SetNumFunctor( NumericalFunctor_ptr theFunct )
{ {
if ( myNumericalFunctor ) if ( myNumericalFunctor )
myNumericalFunctor->Destroy(); myNumericalFunctor->UnRegister();
myNumericalFunctor = DownCast<NumericalFunctor_i*>(theFunct); myNumericalFunctor = DownCast<NumericalFunctor_i*>(theFunct);
@ -1731,13 +1731,13 @@ LogicalNOT_i::LogicalNOT_i()
LogicalNOT_i::~LogicalNOT_i() LogicalNOT_i::~LogicalNOT_i()
{ {
if ( myPredicate ) if ( myPredicate )
myPredicate->Destroy(); myPredicate->UnRegister();
} }
void LogicalNOT_i::SetPredicate( Predicate_ptr thePredicate ) void LogicalNOT_i::SetPredicate( Predicate_ptr thePredicate )
{ {
if ( myPredicate ) if ( myPredicate )
myPredicate->Destroy(); myPredicate->UnRegister();
myPredicate = SMESH::GetPredicate(thePredicate); myPredicate = SMESH::GetPredicate(thePredicate);
@ -1771,10 +1771,10 @@ LogicalBinary_i::LogicalBinary_i()
LogicalBinary_i::~LogicalBinary_i() LogicalBinary_i::~LogicalBinary_i()
{ {
if ( myPredicate1 ) if ( myPredicate1 )
myPredicate1->Destroy(); myPredicate1->UnRegister();
if ( myPredicate2 ) if ( myPredicate2 )
myPredicate2->Destroy(); myPredicate2->UnRegister();
} }
void LogicalBinary_i::SetMesh( SMESH_Mesh_ptr theMesh ) void LogicalBinary_i::SetMesh( SMESH_Mesh_ptr theMesh )
@ -1789,7 +1789,7 @@ void LogicalBinary_i::SetMesh( SMESH_Mesh_ptr theMesh )
void LogicalBinary_i::SetPredicate1( Predicate_ptr thePredicate ) void LogicalBinary_i::SetPredicate1( Predicate_ptr thePredicate )
{ {
if ( myPredicate1 ) if ( myPredicate1 )
myPredicate1->Destroy(); myPredicate1->UnRegister();
myPredicate1 = SMESH::GetPredicate(thePredicate); myPredicate1 = SMESH::GetPredicate(thePredicate);
@ -1803,7 +1803,7 @@ void LogicalBinary_i::SetPredicate1( Predicate_ptr thePredicate )
void LogicalBinary_i::SetPredicate2( Predicate_ptr thePredicate ) void LogicalBinary_i::SetPredicate2( Predicate_ptr thePredicate )
{ {
if ( myPredicate2 ) if ( myPredicate2 )
myPredicate2->Destroy(); myPredicate2->UnRegister();
myPredicate2 = SMESH::GetPredicate(thePredicate); myPredicate2 = SMESH::GetPredicate(thePredicate);
@ -1876,7 +1876,7 @@ FilterManager_i::FilterManager_i()
FilterManager_i::~FilterManager_i() FilterManager_i::~FilterManager_i()
{ {
//TPythonDump()<<this<<".Destroy()"; //TPythonDump()<<this<<".UnRegister()";
} }
@ -2267,12 +2267,12 @@ Filter_i::Filter_i()
Filter_i::~Filter_i() Filter_i::~Filter_i()
{ {
if ( myPredicate ) if ( myPredicate )
myPredicate->Destroy(); myPredicate->UnRegister();
if(!CORBA::is_nil(myMesh)) if(!CORBA::is_nil(myMesh))
myMesh->Destroy(); myMesh->UnRegister();
//TPythonDump()<<this<<".Destroy()"; //TPythonDump()<<this<<".UnRegister()";
} }
//======================================================================= //=======================================================================
@ -2282,7 +2282,7 @@ Filter_i::~Filter_i()
void Filter_i::SetPredicate( Predicate_ptr thePredicate ) void Filter_i::SetPredicate( Predicate_ptr thePredicate )
{ {
if ( myPredicate ) if ( myPredicate )
myPredicate->Destroy(); myPredicate->UnRegister();
myPredicate = SMESH::GetPredicate(thePredicate); myPredicate = SMESH::GetPredicate(thePredicate);
@ -2315,7 +2315,7 @@ SetMesh( SMESH_Mesh_ptr theMesh )
theMesh->Register(); theMesh->Register();
if(!CORBA::is_nil(myMesh)) if(!CORBA::is_nil(myMesh))
myMesh->Destroy(); myMesh->UnRegister();
myMesh = SMESH_Mesh::_duplicate( theMesh ); myMesh = SMESH_Mesh::_duplicate( theMesh );
TPythonDump()<<this<<".SetMesh("<<theMesh<<")"; TPythonDump()<<this<<".SetMesh("<<theMesh<<")";
@ -2722,7 +2722,7 @@ CORBA::Boolean Filter_i::GetCriteria( SMESH::Filter::Criteria_out theCriteria )
CORBA::Boolean Filter_i::SetCriteria( const SMESH::Filter::Criteria& theCriteria ) CORBA::Boolean Filter_i::SetCriteria( const SMESH::Filter::Criteria& theCriteria )
{ {
if ( myPredicate != 0 ) if ( myPredicate != 0 )
myPredicate->Destroy(); myPredicate->UnRegister();
SMESH::FilterManager_i* aFilter = new SMESH::FilterManager_i(); SMESH::FilterManager_i* aFilter = new SMESH::FilterManager_i();
FilterManager_ptr aFilterMgr = aFilter->_this(); FilterManager_ptr aFilterMgr = aFilter->_this();
@ -3421,7 +3421,7 @@ FilterLibrary_i::FilterLibrary_i()
FilterLibrary_i::~FilterLibrary_i() FilterLibrary_i::~FilterLibrary_i()
{ {
delete myFileName; delete myFileName;
//TPythonDump()<<this<<".Destroy()"; //TPythonDump()<<this<<".UnRegister()";
} }
//======================================================================= //=======================================================================

View File

@ -89,7 +89,7 @@ Measurements_i::Measurements_i()
//======================================================================= //=======================================================================
Measurements_i::~Measurements_i() Measurements_i::~Measurements_i()
{ {
//TPythonDump()<<this<<".Destroy()"; //TPythonDump()<<this<<".UnRegister()";
} }
static bool getNodeNodeDistance (SMESH::Measure& theMeasure, static bool getNodeNodeDistance (SMESH::Measure& theMeasure,

View File

@ -132,7 +132,7 @@ SMESH_Mesh_i::~SMESH_Mesh_i()
// this method is called from destructor of group (PAL6331) // this method is called from destructor of group (PAL6331)
//_impl->RemoveGroup( aGroup->GetLocalID() ); //_impl->RemoveGroup( aGroup->GetLocalID() );
aGroup->myMeshServant = 0; aGroup->myMeshServant = 0;
aGroup->Destroy(); aGroup->UnRegister();
} }
} }
_mapGroups.clear(); _mapGroups.clear();
@ -144,7 +144,7 @@ SMESH_Mesh_i::~SMESH_Mesh_i()
continue; continue;
SMESH_subMesh_i* aSubMesh = dynamic_cast<SMESH_subMesh_i*>(SMESH_Gen_i::GetServant(itSM->second).in()); SMESH_subMesh_i* aSubMesh = dynamic_cast<SMESH_subMesh_i*>(SMESH_Gen_i::GetServant(itSM->second).in());
if (aSubMesh) { if (aSubMesh) {
aSubMesh->Destroy(); aSubMesh->UnRegister();
} }
} }
_mapSubMeshIor.clear(); _mapSubMeshIor.clear();
@ -156,7 +156,7 @@ SMESH_Mesh_i::~SMESH_Mesh_i()
continue; continue;
SMESH_Hypothesis_i* aHypo = dynamic_cast<SMESH_Hypothesis_i*>(SMESH_Gen_i::GetServant(itH->second).in()); SMESH_Hypothesis_i* aHypo = dynamic_cast<SMESH_Hypothesis_i*>(SMESH_Gen_i::GetServant(itH->second).in());
if (aHypo) { if (aHypo) {
aHypo->Destroy(); aHypo->UnRegister();
} }
} }
_mapHypo.clear(); _mapHypo.clear();

View File

@ -40,7 +40,7 @@ def CheckBelongToGeomFilterOld(theMeshGen, theMesh, theShape, theSubShape, theEl
aBelongToGeom.SetElementType(theElemType) aBelongToGeom.SetElementType(theElemType)
aFilter.SetPredicate(aBelongToGeom) aFilter.SetPredicate(aBelongToGeom)
aFilterMgr.Destroy() aFilterMgr.UnRegister()
return aFilter.GetElementsId(theMesh) return aFilter.GetElementsId(theMesh)
## Current style ## Current style

View File

@ -36,7 +36,7 @@ def BuildGroupLyingOn(theMesh, theElemType, theName, theShape):
aFilter.SetPredicate(aLyingOnGeom) aFilter.SetPredicate(aLyingOnGeom)
anIds = aFilter.GetElementsId(theMesh) anIds = aFilter.GetElementsId(theMesh)
aFilterMgr.Destroy() aFilterMgr.UnRegister()
aGroup = theMesh.CreateGroup(theElemType, theName) aGroup = theMesh.CreateGroup(theElemType, theName)
aGroup.Add(anIds) aGroup.Add(anIds)

View File

@ -884,7 +884,7 @@ class smeshDC(SMESH._objref_SMESH_Gen):
aCriteria = [] aCriteria = []
aCriteria.append(aCriterion) aCriteria.append(aCriterion)
aFilter.SetCriteria(aCriteria) aFilter.SetCriteria(aCriteria)
aFilterMgr.Destroy() aFilterMgr.UnRegister()
return aFilter return aFilter
## Creates a numerical functor by its type ## Creates a numerical functor by its type
@ -1009,7 +1009,7 @@ class smeshDC(SMESH._objref_SMESH_Gen):
pass pass
aMeasurements = self.CreateMeasurements() aMeasurements = self.CreateMeasurements()
result = aMeasurements.MinDistance(src1, src2) result = aMeasurements.MinDistance(src1, src2)
aMeasurements.Destroy() aMeasurements.UnRegister()
return result return result
## Get bounding box of the specified object(s) ## Get bounding box of the specified object(s)
@ -1046,7 +1046,7 @@ class smeshDC(SMESH._objref_SMESH_Gen):
pass pass
aMeasurements = self.CreateMeasurements() aMeasurements = self.CreateMeasurements()
result = aMeasurements.BoundingBox(srclist) result = aMeasurements.BoundingBox(srclist)
aMeasurements.Destroy() aMeasurements.UnRegister()
return result return result
import omniORB import omniORB
@ -1807,7 +1807,7 @@ class Mesh:
aCriteria.append(Criterion) aCriteria.append(Criterion)
aFilter.SetCriteria(aCriteria) aFilter.SetCriteria(aCriteria)
group = self.MakeGroupByFilter(groupName, aFilter) group = self.MakeGroupByFilter(groupName, aFilter)
aFilterMgr.Destroy() aFilterMgr.UnRegister()
return group return group
## Creates a mesh group by the given criteria (list of criteria) ## Creates a mesh group by the given criteria (list of criteria)
@ -1820,7 +1820,7 @@ class Mesh:
aFilter = aFilterMgr.CreateFilter() aFilter = aFilterMgr.CreateFilter()
aFilter.SetCriteria(theCriteria) aFilter.SetCriteria(theCriteria)
group = self.MakeGroupByFilter(groupName, aFilter) group = self.MakeGroupByFilter(groupName, aFilter)
aFilterMgr.Destroy() aFilterMgr.UnRegister()
return group return group
## Creates a mesh group by the given filter ## Creates a mesh group by the given filter
@ -1851,7 +1851,7 @@ class Mesh:
aPredicate = aFilterMgr.CreateFreeEdges() aPredicate = aFilterMgr.CreateFreeEdges()
aPredicate.SetMesh(self.mesh) aPredicate.SetMesh(self.mesh)
aBorders = aPredicate.GetBorders() aBorders = aPredicate.GetBorders()
aFilterMgr.Destroy() aFilterMgr.UnRegister()
return aBorders return aBorders
## Removes a group ## Removes a group
@ -2415,7 +2415,7 @@ class Mesh:
aMeasurements = self.smeshpyD.CreateMeasurements() aMeasurements = self.smeshpyD.CreateMeasurements()
aMeasure = aMeasurements.MinDistance(id1, id2) aMeasure = aMeasurements.MinDistance(id1, id2)
aMeasurements.Destroy() aMeasurements.UnRegister()
return aMeasure return aMeasure
## Get bounding box of the specified object(s) ## Get bounding box of the specified object(s)
@ -2464,7 +2464,7 @@ class Mesh:
pass pass
aMeasurements = self.smeshpyD.CreateMeasurements() aMeasurements = self.smeshpyD.CreateMeasurements()
aMeasure = aMeasurements.BoundingBox(srclist) aMeasure = aMeasurements.BoundingBox(srclist)
aMeasurements.Destroy() aMeasurements.UnRegister()
return aMeasure return aMeasure
# Mesh edition (SMESH_MeshEditor functionality): # Mesh edition (SMESH_MeshEditor functionality):