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: 17606
Status: resolved
Priority: 0/
Queue: WWW-Mechanize

People
Owner: Nobody in particular
Requestors: byte [...] bitman.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: WWW::Mechanize 1.18 leaks memory
Date: Sun, 12 Feb 2006 19:07:38 -0600
To: "Andy Lester" <andy [...] petdance.com>
From: "Doug Finch" <byte [...] bitman.org>
Here's the code. I'm running it under Windows 2000 Advanced Server, ActiveState Perl 5.8.7 Build 815 and WWW::Mechanize 1.18. I see the memory leak in Windows by watching the Task Manager for the Perl Process as it climbs with each loop. Thanks! ########################### use WWW::Mechanize; $ua = WWW::Mechanize->new(agent=>"Mozilla/4.0+(compatible;+MSIE+6.0; +Windows+NT+5.0;+ZetaSpider",stack_depth => 1); for ($x=0;$x<100000000;$x++) { $ua->get("http://www.google.com"); $gist = $ua->content(format => "text" ); # Leaks Memory # $gist = $ua->response()->content(format => "text"); # Doesn't Leak Memory print("$x\n"); # Just to show how many 'get's } Show quoted text
----- Original Message ----- From: Andy Lester To: Doug Finch Sent: Sunday, February 12, 2006 6:26 PM Subject: Re: WWW::Mechanize 1.18 On Feb 12, 2006, at 6:19 PM, Doug Finch wrote:
> I've found the source of the memory leak. It is quite interesting > (probably 'cause I don't understand the internals of your module): > > $str = $mech->content(format=>"text") # LEAKS Memory > > $str = $mech->response->content(format=>"text") # Doesn't Leak Memory
VERY interesting. Can I see the code that you used to figure out that they leak? It will help me figure out the details, and I can probably turn it into a test in the test suite! In fact, please send a mail to bug-www-mechanize@rt.cpan.org that describes all this, so that I have a record of it, and so that others can see it, too. It will be very informative. Thanks! xoa -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance