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]; "
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.