From: jfa Date: Wed, 23 Nov 2005 16:09:57 +0000 (+0000) Subject: Improve variable handling X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=41a6f1190e74979864933bbbad2c328887fdaa01;p=modules%2Fkernel.git Improve variable handling --- diff --git a/src/SALOMEDS/SALOMEDS_StudyBuilder_i.cxx b/src/SALOMEDS/SALOMEDS_StudyBuilder_i.cxx index a020990f5..8e916a7f5 100644 --- a/src/SALOMEDS/SALOMEDS_StudyBuilder_i.cxx +++ b/src/SALOMEDS/SALOMEDS_StudyBuilder_i.cxx @@ -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));