In my test app I call the function as follows:my $hHTTP; my $hDaemon = HTTP::Daemon::SSL->new(LocalPort => 8001, SSL_key_file => $curDir . "/certs/server-key.pem", SSL_cert_file => $curDir . "/certs/server-cert.pem" ) || die "Can't start SSH Daemon. $!\n"; my $soap = SOAP::Transport::HTTP::Server -> new ( ) -> dispatch_to(qw(auth)); while ($hHTTP = $hDaemon->accept) { while (my $request = $hHTTP->get_request) { my $req = $request->{_headers}{soapaction}; $soap->request($request); $soap->handle(); my $response = $soap->response(); $hHTTP->send_response($response); } $hHTTP->close(); }
I've wrapped this file in a test.pl that exec's it, waits 3 seconds and repeats. Here's the 'new' function that gets called inside the SOAP service:use SOAP::Lite +autodispatch => proxy => 'https://testbed.org:8001/', on_fault => \&handle_fault; my $obj = auth->new();
All I can figure (at this point) (based on my limited understanding of Perl) is that SOAP or HTTP are keeping the pointers to the instances of my class and not letting them go. Im wondering if there is some way to coax the refcount of my package so it can be freed / GC'd.sub new { my $pkg = shift; my $self = {}; bless ($self, $pkg); return $self; }
In reply to Leaking memory from SOAP service by ethrbunny
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |