Keep removing bits till the leak stops to find out which bit leaks.

Tim.

On Fri, Aug 17, 2001 at 01:30:51AM +0200, Toni Andjelkovic wrote:
> the following code appears to leak memory with
> DBI-1.19, but not with DBI-1.18. i tried with
> perl-5.6.1.
> 
> can anyone confirm this?
> 
> # ---
> use DBI;
> use Getopt::Std;
> 
> getopts('n:', my $opt = {}) or die "usage: $0 [-n loops]\n";
> my $loops = $opt->{n} || 1;
> for (1 .. $loops) {
>     my $dbh = DBI->connect(
>         'DBI:Pg:dbname=foobar;host=dbhost01;port=5432',
>         'dbuser',
>         'dbpassword',
>     );
>     my $sth = $dbh->prepare("SELECT * FROM Customer WHERE ID = 1");
>     $sth->execute;
>     my $hashref = $sth->fetchrow_hashref;
>     $sth->finish;
>     $dbh->disconnect;
>     print STDERR ".";
> }
> # ---
> 
> cheers,
> -- 
> Toni Andjelkovic
> <[EMAIL PROTECTED]>
> 

Reply via email to