From: Bernhard W. <ber...@we...> - 2004-03-24 08:19:41
|
<html><style>p {margin: 0px}</style><body bgcolor='#ffffff' style='font-size:9pt; font-family:Verdana; font-family: Verdana' ><P>Hi ...,</P><P>very nice tool, but is it possible that there is a memory leak? If I run the example below the perl process will grow and grow ...</P><P>Or is there something wrong with my code?</P><P>Best regards,</P><P>Bernhard</P><P> </P><P>================================================================</P><P>use strict;<BR>use XML::XSLT;</P><P>my $xsl = "D:/transfer/XSL_BUG/HTML.xsl";<BR>my $xmlfile = "D:/transfer/XSL_BUG/attributes.xml";</P><P>my $xslurl = makeURL($xsl);<BR>my $xmlurl = makeURL($xmlfile);</P><P>my $i;<BR>my $xslt;<BR>for($i=0; $i<200; $i++) {<BR>$xslt = XML::XSLT->new ($xslurl, warnings => 1);</P><P>$xslt->transform ($xmlurl);<BR>print $xslt->toString;</P><P><BR>$xslt->dispose();<BR>}</P><P>0;</P><P><BR>sub makeURL {<BR> my $string = shift;</P><P>  ! ; if( $string =~ m|^file\://|i ) { return $string; } # if already URL format<BR> $string =~ s|\\|\/|g; # replace \\<BR> $string =~ s/\:/\|/o; # replace :<BR> return "<A href='file://".$string'>FILE://".$string</A>; # add file://<BR>}</P><br><table cellpadding="0" cellspacing="0" border="0"><tr><td bgcolor="#000000"><img src="http://img.web.de/p.gif" width="1" height="1" border="0" alt="" /></td></tr><tr><td style="font-family:verdana; font-size:12px; line-height:17px;">... and the winner is... WEB.DE FreeMail! - Deutschlands beste E-Mail<br>ist zum 39. Mal Testsieger (PC Praxis 03/04) <A HREF="http://f.web.de/?mc=021191"><B>http://f.web.de/?mc=021191</B></A></td></tr></tabl! e></body></html> |