I have some Perl code:
use HTML::Parse;
use HTML::FormatText;
# ...
my $txtFormatter = HTML::FormatText->new();
while ( ... ) { # some condition
my $txt = # get from a file
my $html_tree = HTML::TreeBuilder->new_from_content($txt);
$txt = $txtFormatter->format($html_tree);
$html_tree->delete();
# write $txt to a file
}
I noticed the perl.exe
process steadily increases in size (up to 600 MB after 2 million or so loop iterations). If I take out the HTML::TreeBuilder
stuff, it does not increase at all. Is there anything I can do to plug this leak?