Re: Memory leak!! - Mailing list pgsql-interfaces

From Ian Barwick
Subject Re: Memory leak!!
Date
Msg-id 200304090838.09883.barwick@gmx.net
Whole thread Raw
In response to Re: Memory leak!!  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Memory leak!!
List pgsql-interfaces
On Wednesday 09 April 2003 06:58, Tom Lane wrote:
> "P.N.Guru Prasad" <pnguruji@yahoo.com> writes:
> > while (1) {
> >   print "sql executed and returned :", $Dbh->prepare("select user_id from
> > users limit 1")->execute, "\n";
> > }
>
> I'm not a DBI user, but I'd kinda expect that executing a query would
> result in an object holding the results from that query.  Don't you need
> to do something to close/delete the result objects you're generating?

Does

while (1) { my $sth = $Dbh->prepare("select user_id from users limit 1"); print "sql executed and returned :",
$sth->execute,"\n";  $sth->finish(); 
}

make any difference?

If not try asking the dbi-users list,  dbi-users@perl.org
( http://lists.perl.org/showlist.cgi?name=dbi-users )

Ian Barwick
barwick@gmx.net



pgsql-interfaces by date:

Previous
From: Joe Conway
Date:
Subject: Re: [HACKERS] More protocol discussion: breaking down
Next
From: "Ray Cheng"
Date:
Subject: Listen/Notify Application using libpq++ library