From: eap Date: Wed, 20 Dec 2017 16:58:48 +0000 (+0300) Subject: Memory leaks X-Git-Tag: V9_0_0~1^2~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ba2e210e022e0beeffbfb56463211a1363e8c841;p=modules%2Fgeom.git Memory leaks --- diff --git a/src/GEOMGUI/GEOM_Displayer.cxx b/src/GEOMGUI/GEOM_Displayer.cxx index 3503704e3..c08cee809 100755 --- a/src/GEOMGUI/GEOM_Displayer.cxx +++ b/src/GEOMGUI/GEOM_Displayer.cxx @@ -1790,7 +1790,8 @@ SALOME_Prs* GEOM_Displayer::buildPresentation( const QString& entry, if ( !GeomObject->_is_nil() ) { - theIO->setName( GeomObject->GetName() ); + CORBA::String_var name = GeomObject->GetName(); + theIO->setName( name ); // finally set shape setShape( GEOM_Client::get_client().GetShape( GeometryGUI::GetGeomGen(), GeomObject ) ); } diff --git a/src/GEOM_I/GEOM_Gen_i.cc b/src/GEOM_I/GEOM_Gen_i.cc index 7ccc970dd..e487554d5 100644 --- a/src/GEOM_I/GEOM_Gen_i.cc +++ b/src/GEOM_I/GEOM_Gen_i.cc @@ -159,7 +159,7 @@ char* GEOM_Gen_i::IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject, GEOM::GEOM_BaseObject_var anObject = GEOM::GEOM_BaseObject::_narrow(_orb->string_to_object(IORString)); if (!CORBA::is_nil(anObject)) { - return CORBA::string_dup(anObject->GetEntry()); + return anObject->GetEntry(); } return 0; }