Salome HOME
CCAR: remove memory leaks in non local SALOMEDS
[modules/kernel.git] / src / SALOMEDS / SALOMEDS_SComponent_i.cxx
index cbe8ed3370d3b0723d94c340b5c7fd7a6a622fab..48d71ed7de4595134869d612fa37ef157e580ace 100644 (file)
@@ -33,9 +33,8 @@ using namespace std;
 SALOMEDS::SComponent_ptr SALOMEDS_SComponent_i::New(const SALOMEDSImpl_SComponent& theImpl, CORBA::ORB_ptr theORB)
 {
   SALOMEDS_SComponent_i* sco_servant = new SALOMEDS_SComponent_i(theImpl, theORB);
-  SALOMEDS::SComponent_var sco  = SALOMEDS::SComponent::_narrow(sco_servant->SComponent::_this()); 
 
-  return sco._retn();
+  return sco_servant->_this();
 }    
 
 //============================================================================