From: eap Date: Fri, 14 Dec 2012 14:01:30 +0000 (+0000) Subject: 21948: EDF SMESH : Memory is not freed when deleting a mesh X-Git-Tag: V6_main_FINAL~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=eb9e4d58d4c59471dd4cb49174891f81d35e532f;p=plugins%2Fhybridplugin.git 21948: EDF SMESH : Memory is not freed when deleting a mesh Elimenate memory leaks on CORBA objects, servants of SALOMEDS objects etc --- diff --git a/src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx b/src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx index 257c774..3a48f16 100644 --- a/src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx +++ b/src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx @@ -211,13 +211,10 @@ TopoDS_Shape GHS3DPlugin_GHS3D::entryToShape(std::string entry) GEOM::GEOM_Object_var aGeomObj; TopoDS_Shape S = TopoDS_Shape(); SALOMEDS::SObject_var aSObj = myStudy->FindObjectID( entry.c_str() ); - SALOMEDS::GenericAttribute_var anAttr; - - if (!aSObj->_is_nil() && aSObj->FindAttribute(anAttr, "AttributeIOR")) { - SALOMEDS::AttributeIOR_var anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr); - CORBA::String_var aVal = anIOR->Value(); - CORBA::Object_var obj = myStudy->ConvertIORToObject(aVal); + if (!aSObj->_is_nil() ) { + CORBA::Object_var obj = aSObj->GetObject(); aGeomObj = GEOM::GEOM_Object::_narrow(obj); + aSObj->UnRegister(); } if ( !aGeomObj->_is_nil() ) S = smeshGen_i->GeomObjectToShape( aGeomObj.in() );