]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Improve variable handling
authorjfa <jfa@opencascade.com>
Wed, 23 Nov 2005 16:09:57 +0000 (16:09 +0000)
committerjfa <jfa@opencascade.com>
Wed, 23 Nov 2005 16:09:57 +0000 (16:09 +0000)
src/SALOMEDS/SALOMEDS_StudyBuilder_i.cxx

index a020990f53e7b05b578c99ef4d6038bd74a44b99..8e916a7f5e13c08e2cc9ca416f7edda22c8f41ba 100644 (file)
@@ -206,9 +206,8 @@ SALOMEDS::GenericAttribute_ptr SALOMEDS_StudyBuilder_i::FindOrCreateAttribute(SA
 {
   SALOMEDS::Locker lock;
   Handle(SALOMEDSImpl_SObject) aSO;
-  char* anID = anObject->GetID();  
-  aSO = Handle(SALOMEDSImpl_Study)::DownCast(_impl->GetOwner())->GetSObject(anID);
-  delete [] anID;
+  CORBA::String_var anID = anObject->GetID();
+  aSO = Handle(SALOMEDSImpl_Study)::DownCast(_impl->GetOwner())->GetSObject(anID.inout());
   Handle(TDF_Attribute) anAttr;
   try {
      anAttr = _impl->FindOrCreateAttribute(aSO, TCollection_AsciiString((char*)aTypeOfAttribute));