Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the WWW-Mechanize CPAN distribution.

Report information
The Basics
Id: 4831
Status: resolved
Priority: 0/
Queue: WWW-Mechanize

People
Owner: Nobody in particular
Requestors: cwchang1 [...] yahoo.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.71_02
Fixed in: (no value)



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. ~
From: cwchang1 [...] yahoo.com
BTW, I'm using RH9.0 with Perl 5.8.0 on my Linux box. LWP is version 5.76. [guest - Mon Jan 5 02:20:52 2004]: Show quoted text
> 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. > ~
Show quoted text
> If it would be helpful, maybe I could add an option to not keep > history?
I'll assume that this isn't really necessary. If it is, please open up a new ticket for it.