Memory Leaks?

Benjamin M. Hill (Benjamin.M.Hill@dartmouth.edu)
07 Jul 97 12:15:20 EDT


I didn't even know perl did that. Or does it?

But, unfortunately for me, I have some sort of leak somewhere.  (Nice and
vauge)  In the standard code, for stripping HTML from a rawdata get, it goes
like:

 	#Format the page as text
    $htmldata = HTML::Parse::parse_html($rawdata);
    $formatter = new HTML::FormatText;
    $textdata = $formatter->format($htmldata);

(Which I have embedded in a loop that runs lots and lots 'o times.)

I asked the local profs here at school, and they aren't too familiar with "new"
used in perl.

So, I tried this:

 	#Format the page as text
    $htmldata = HTML::Parse::parse_html($rawdata);
    $formatter = new HTML::FormatText unless defined $formatter;
    $textdata = $formatter->format($htmldata);

Which still didn't cure the problem, each time it loops through this area, it
still grows by about 100K.

Now, the problems is that I'm not completely positive that this section is my
problem, which is why this is a 2 part request... is there anyone out there
that wouldn't mind a semi-newbie bouncing questions off of them?

Thank you very much.

-Benjamin