]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Memory leaks
authoreap <eap@opencascade.com>
Wed, 20 Dec 2017 16:58:48 +0000 (19:58 +0300)
committereap <eap@opencascade.com>
Wed, 20 Dec 2017 16:58:48 +0000 (19:58 +0300)
src/GEOMGUI/GEOM_Displayer.cxx
src/GEOM_I/GEOM_Gen_i.cc

index 3503704e3740837b01f820647c5db996f6902ef4..c08cee809ca08401678b1a4e939545b7b5d44ee2 100755 (executable)
@@ -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 ) );
                   }
index 7ccc970dd0e14bdc1dba09a1638bdd9e876f5253..e487554d588dbe6809da98d2b3a74ab76f6ca7fc 100644 (file)
@@ -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;
 }