Menu

#79 Located memory leak

xml_parsing
open
nobody
None
5
2009-07-25
2009-07-25
Anonymous
No

When I create a new Message and run SoapProxy::Execute on it memory is created that wont be freed. To overcome this problem. The proxy has to be deleted and created each time you wont to make a new request. Since this approach is very slow in comparison to the normal use, it would be usefull to have a bugfix for this. The version that I have downloaded is EasySoap++-0.8.0. Unfortunately the EasySoap memory management is to complex to understand it in the first run, so that I cannot provide you with a solution.

The code looks as follows:
EasySoap::SOAPMethod addmethod("DataServer_Read", "http://wsdl.echelon.com/web_services_ns/ilon100/v3.0/message/");

    EasySoap::SOAPParameter& iLONDataServer = addmethod.AddParameter\("iLONDataServer"\);
    EasySoap::SOAPParameter& dpType = iLONDataServer.AddParameter\("DPType"\);
    dpType.AddParameter\("UCPTname"\) << in\_dataPointType.c\_str\(\);

    std::vector<std::string>::const\_iterator iter = in\_dataPoints.begin\(\);

    // fill soap list with data points to be updated
    for\(; iter \!= in\_dataPoints.end\(\); ++iter\)
    \{
        EasySoap::SOAPParameter& dp = dpType.AddParameter\("DP"\);
        dp.AddParameter\("UCPTpointName"\) << \(\*iter\);
    \}


    // read out data points that will have changed
    const EasySoap::SOAPResponse& addresp = m\_proxy.Execute\(addmethod\);

Discussion


Log in to post a comment.

MongoDB Logo MongoDB