From 41a6f1190e74979864933bbbad2c328887fdaa01 Mon Sep 17 00:00:00 2001 From: jfa Date: Wed, 23 Nov 2005 16:09:57 +0000 Subject: [PATCH] Improve variable handling --- src/SALOMEDS/SALOMEDS_StudyBuilder_i.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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)); -- 2.39.2