Memory leaks with SOAP Lite

Memory leaks with SOAP Lite

am 30.08.2007 16:40:56 von jrpfinch

I would be interested to know why the following script eats up an ever-
increasing amount of memory. I have tried it with perl 5.8.8 on Intel
Solaris 9, Sparc Solaris 8 and Redhat Linux boxes all with the same
result. Assigned SOAP Lite to a variable and printing that instead
yields the same result.

use strict;
use warnings;
use SOAP::Lite;

while (1)
{
print SOAP::Lite
-> uri("http://172.19.17.252:443")
-> proxy("http://172.19.17.252:443", timeout => 5)
-> kickWatchdog("gerard")
-> result."\n";
sleep 5;
}

Many thanks

Jon

Re: Memory leaks with SOAP Lite

am 30.08.2007 18:28:16 von jrpfinch

Solution is to use the OO version:

use strict;
use warnings;
use SOAP::Lite;
my $soap = SOAP::Lite
-> uri('http://172.19.17.252:443/')
-> proxy('http://172.19.17.252:443/');




my $response;

while (1)
{

$response = $soap
-> kickWatchdog("gerard")
-> result;

print "$response\n";
sleep 5;
}