Subject: | severe memory leak |
Date: | Thu, 14 Jan 2010 00:52:15 +0100 |
To: | bug-Lingua-EN-NameParse [...] rt.cpan.org |
From: | Andreas Gruber <agruber [...] tbi.univie.ac.at> |
Below is a simple linux perl program that shows that this module has
some memory leaks:
use warnings;
use strict;
use Lingua::EN::NameParse;
for my $i ( 1 .. 100 ) {
my %args = (
auto_clean => 1,
force_case => 1,
lc_prefix => 1,
initials => 3,
allow_reversed => 1
);
my $parser = new Lingua::EN::NameParse(%args);
my $mem = `ps h -o size $$`;
chomp($mem);
$mem = sprintf( "$i :: %.1f", $mem / 1024 );
print "$mem\n";
}
Iteration 1: 4.6 MB
Iteration 100: 134.3 MB
There seems to be a circular reference somewhere.