Subject: | memory leak |
Hi,
I've beeing using WWW::Mechanize 0.71 and kept having memory leak problem. Here is an example script:
#!/usr/bin/perl
use WWW::Mechanize;
use Devel::Size qw(size total_size);
my $agent = WWW::Mechanize->new();
while (1) {
$agent->get(qq(http://www.yahoo.com));
print "agent size = ".total_size($agent)."\n";
}
This script will show that the size of the agent object keeps growing fast. Same can be verified using "top".
Changing the object type from WWW::Mechanize to LWP::UserAgent will immediately fix the leak but certainly lost all the wonderful functions Mechanize provides.
I've also tried the latest 0.71_2. Still leaks.
I would appreciate very much if any insight from the team is provided. Thanks in advance.
~