Memory leaks

This commit is contained in:
eap 2017-12-20 19:58:48 +03:00
parent 1bb74b43ea
commit ba2e210e02
2 changed files with 3 additions and 2 deletions

View File

@ -1790,7 +1790,8 @@ SALOME_Prs* GEOM_Displayer::buildPresentation( const QString& entry,
if ( !GeomObject->_is_nil() ) if ( !GeomObject->_is_nil() )
{ {
theIO->setName( GeomObject->GetName() ); CORBA::String_var name = GeomObject->GetName();
theIO->setName( name );
// finally set shape // finally set shape
setShape( GEOM_Client::get_client().GetShape( GeometryGUI::GetGeomGen(), GeomObject ) ); setShape( GEOM_Client::get_client().GetShape( GeometryGUI::GetGeomGen(), GeomObject ) );
} }

View File

@ -159,7 +159,7 @@ char* GEOM_Gen_i::IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
GEOM::GEOM_BaseObject_var anObject = GEOM::GEOM_BaseObject_var anObject =
GEOM::GEOM_BaseObject::_narrow(_orb->string_to_object(IORString)); GEOM::GEOM_BaseObject::_narrow(_orb->string_to_object(IORString));
if (!CORBA::is_nil(anObject)) { if (!CORBA::is_nil(anObject)) {
return CORBA::string_dup(anObject->GetEntry()); return anObject->GetEntry();
} }
return 0; return 0;
} }