Valgrinding

Doing a routine valgrind turned up some minor leaks that should probably
be addressed none-the-less:

In orocos-rtt-1.10.2/src/corba/CorbaLib.cpp 218ff
(and kdl-1.0.1/src/bindings/rtt/corba/corbatoolkit.cpp line 42ff) there
are
a handful of lines of the form:

if ( name == "int" )
return ti->addProtocol(ORO_CORBA_PROTOCOL_ID, new
CorbaTemplateProtocol<int>() );

You can use auto_ptr (rather obfuscated):

if ( name == "int" )
return ti->addProtocol(ORO_CORBA_PROTOCOL_ID,
std::auto_ptr< CorbaTemplateProtocol<int>
>(
new CorbaTemplateProtocol<int>() ).get()
);

or probably better just put on the stack:

if ( name == "int" ) {
CorbaTemplateProtocol<int> ctProtocol;
return ti->addProtocol(ORO_CORBA_PROTOCOL_ID, &ctProtocol );
}

In orocos-ocl-1.10.1/deployment/DeploymentComponent.cpp line 255ff,
please add the closedir(res):

bool DeploymentComponent::configureHook()
{
string toolpath = compPath.get() + "/rtt/"+ target.get()
+"/plugins";
DIR* res = opendir( toolpath.c_str() );
if (res) {
closedir(res); // <<<<
log(Info) << "Loading plugins from " + toolpath <<endlog();
import( toolpath );
} else {
log(Info) << "No plugins present in " + toolpath <<
endlog();
}
return true;
}

Apologies for the lack of a proper diff

- alexis.

>