I'm not sure what version (perl, CGI) you're running, but I don't seem to be able to duplicate the problem in either of my two environments:
WinXP:
perl, v5.6.1 built for MSWin32-x86-multi-thread
Binary build 631 provided by ActiveState Tool Corp. Built 17:16:22 Jan
+ 2 2002
$CGI::revision = '$Id: CGI.pm,v 1.49 2001/02/04 23:08:39 lstein Exp $'
+;
$CGI::VERSION='2.752';
Solaris 8:
perl, v5.6.0 built for sun4-solaris
$CGI::revision = '$Id: CGI.pm,v 1.19 1999/08/31 17:04:37 lstein Exp $'
+;
$CGI::VERSION='2.56';
Neither of the boxen had leaks running the following:
use strict;
use CGI;
$|++;
my $ct = 0;
while (1)
{
$ct++;
if (1)
{
my $cgi = new CGI("q=$ct");
my $blah = $cgi->param('q');
print " blah: $blah\n";
}
}
On the PC I let them run for more than 256 seconds (256 MB RAM) and I monitored the Solaris version using top with no visible memory leaks. You might try running my code and see if it leaks as well, but I don't think CGI.pm is the cause.
--Jim
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.