Salome HOME
Moved some functionality to VTKViewer_Utilities.h
[modules/kernel.git] / src / SALOMEDS / SALOMEDS_AttributeTarget_i.cxx
index 80b1c2e66a8ba7c2b952c349eb05ce883c53e9fd..70f7b81b920ef1d04812a3412ddf4a17d819d3c4 100644 (file)
@@ -57,8 +57,7 @@ SALOMEDS::Study::ListOfSObject* SALOMEDS_AttributeTarget_i::Get() {
   SALOMEDS_Study_i* aStudy = _mySObject->GetStudyServant();
   for(int index = 0; anIter.More(); anIter.Next(), index++){
     const TDF_Label& aLabel = anIter.Value();
-    SALOMEDS_SObject_i* anSO = SALOMEDS_SObject_i::New(aStudy,aLabel);
-    aSList[index] = anSO->_this();
+    aSList[index] = SALOMEDS_SObject_i::NewRef(aStudy,aLabel)._retn();
   }
   return aSList._retn();
 }