Hello
(as reportet into the Debian Bug Tracking system�)
The following code leaks memory for each invocation of "sub flub":
#! /usr/bin/perl -w
use strict;
use DBI;
my $dbh = DBI->connect('DBI:Pg:dbname=template1','jdassen', undef, {RaiseError
=> 1});
#my $dbh = DBI->connect('DBI:CSV:f_dir=/tmp', undef, undef, {RaiseError => 1});
sub flub() {
local $dbh->{RaiseError};
# This construct is recommended by DBI(3pm)
}
while (1) { flub(); };
The memory leak appears to be independent of the specific DBD used, and
appears to be DBI specific (attempts to reproduce it by using the "local"
construct on a regular hash, rather than a DBI database handler, failed).
bye,
-christian-
[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=90447&repeatmerged=yes
--
I like cats, too! Let's exchange recipes.