From: rahuel Date: Wed, 9 Mar 2005 08:11:11 +0000 (+0000) Subject: Memory Leaks X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c3903fa23a944de301635d61e2c2d64156cc785e;p=modules%2Fsuperv.git Memory Leaks Traces --- diff --git a/src/GraphBase/DataFlowBase_PortsOfNode.cxx b/src/GraphBase/DataFlowBase_PortsOfNode.cxx index e464f54..4c4c04d 100644 --- a/src/GraphBase/DataFlowBase_PortsOfNode.cxx +++ b/src/GraphBase/DataFlowBase_PortsOfNode.cxx @@ -112,14 +112,14 @@ void GraphBase::PortsOfNode::DefPortsOfNode( aPortKind = SUPERV::InLineParameter ; } for ( i = 0 ; i < _NodeInPortsSize ; i++ ) { - cdebug << "DefPortsOfNode delete In" << i << ". " << _NodeInPorts[i] + cdebug << "DefPortsOfNode delete In" << i << ". " << _NodeInPorts[i]->PortName() << endl ; _MapOfNodeInPorts.erase( _NodeInPorts[i]->PortName() ) ; delete _NodeInPorts[i] ; } _NodeInPorts.resize( 0 ); for ( i = 0 ; i < _NodeOutPortsSize ; i++ ) { - cdebug << "DefPortsOfNode delete Out" << i << ". " << _NodeOutPorts[i]->PortName() + cdebug << "DefPortsOfNode delete Out" << i << ". " << _NodeOutPorts[i]->PortName() << endl ; _MapOfNodeOutPorts.erase( _NodeOutPorts[i]->PortName() ) ; delete _NodeOutPorts[i] ; @@ -156,7 +156,8 @@ void GraphBase::PortsOfNode::DefPortsOfNode( } cdebug << "NodeInPortsSize " << _NodeInPortsSize << endl ; for ( i = iVec ; i < _NodeInPortsSize ; i++ ) { - string _aParametername = CORBA::string_dup(aService.ServiceinParameter[i-iVec].Parametername) ; +//JR 24.02.2005 Memory Leak string _aParametername = CORBA::string_dup(aService.ServiceinParameter[i-iVec].Parametername) ; + string _aParametername = string(aService.ServiceinParameter[i-iVec].Parametername) ; const char *aParametername = _aParametername.c_str() ; if ( _MapOfNodeInPorts[ aParametername ] ) { if ( !DataFlowOrComputing && @@ -175,7 +176,7 @@ void GraphBase::PortsOfNode::DefPortsOfNode( _NodeInPorts[i] = new GraphBase::InPort( NodeName , aServiceParameter , aPortKind ); _NodeInPorts[i]->SetDebug( ORB , Graph_prof_debug , Graph_fdebug ) ; -// cdebug << i << ". " << *_NodeInPorts[i] << " " << _NodeInPorts[i]->Kind() << endl ; + cdebug << i << ". " << *_NodeInPorts[i] << " " << _NodeInPorts[i]->Kind() << endl ; } } iVec += aService.ServiceinParameter.length() ; @@ -224,7 +225,8 @@ void GraphBase::PortsOfNode::DefPortsOfNode( } cdebug << "NodeOutPortsSize " << _NodeOutPortsSize << endl ; for ( i = iVec ; i < _NodeOutPortsSize ; i++ ) { - string _aParametername = CORBA::string_dup(aService.ServiceoutParameter[i-iVec].Parametername) ; +//JR 24.02.2005 Memory Leak string _aParametername = CORBA::string_dup(aService.ServiceoutParameter[i-iVec].Parametername) ; + string _aParametername = string(aService.ServiceoutParameter[i-iVec].Parametername) ; const char *aParametername = _aParametername.c_str() ; if ( _MapOfNodeOutPorts[ aParametername ] ) { if ( !DataFlowOrComputing && @@ -243,7 +245,7 @@ void GraphBase::PortsOfNode::DefPortsOfNode( _NodeOutPorts[i] = new GraphBase::OutPort( NodeName , aServiceParameter , aPortKind ); _NodeOutPorts[i]->SetDebug( ORB , Graph_prof_debug , Graph_fdebug ) ; -// cdebug << i << ". " << *_NodeOutPorts[i] << " " << _NodeOutPorts[i]->Kind() << endl ; + cdebug << i << ". " << *_NodeOutPorts[i] << " " << _NodeOutPorts[i]->Kind() << endl ; } } iVec += aService.ServiceoutParameter.length() ;