Hi.

Using Perl v5.8.5 with DBI-1.47 on Linux.

I've developed some Perl scripts which are executed by crons and
handle data by using MySQL. I want to optimize my server's memory
use and would like to avoid and find memory leaks.

I use this code:
----------
$DB   = DBI->connect ("DBI:mysql:database=$DBNAME:host=$DBHOST",
$DBUSER, $DBPASS)
                          or die "Can't connect to database:$DBI::errstr\n";
while(@r1 = $q1->fetchrow_array( )) {...}
$q1->finish;
$DB->disconnect;
---------

Must I compulsory close connections and free memory? Is there another way
to optimize memory use?

Thank you very much.

Reply via email to