in reply to Re: Serious memory leak when using LWP
in thread Serious memory leak when using LWP
FWIW
HTML::Parse returns a HTML::Tree object
Its a known limitation of HTML::Tree, you have to delete() the tree to free the memory, otherwise it will leak a LOT of memory (circular references are circular, keep objects alive forever, unless they're weak)
Rejected in 2005/06 Bug #12283 for HTML-Tree: Use weaken to avoid ->delete()?
With delete there doesn't seem to be much of a leak
perl -MHTML::Parse -le " system qq[pslist.exe -m $$ 2>NUL]; for(1..400 +00){ $ju = parse_html(q{ <p>yo</p> }); $junk = $ju->format; $ju->dele +te; } system qq[pslist.exe -m $$ 2>NUL]; "
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Serious memory leak when using LWP
by Anonymous Monk on Mar 08, 2012 at 15:04 UTC | |
by Anonymous Monk on Mar 09, 2012 at 02:58 UTC |