On Wed, 10 Jan 2001, D. Duccini wrote:
> Get this, all it takes to release the connection (since PQfinish() doesn't
> work and there isn't any Pg::disconnectdb() )
Right, because it relies on the DESTROY method to be called when the
reference goes away, but this doesn't work in mod_perl, alas.
However, in DBI, you can (and should) explicitly close the database
connection with the disconnect method, if you want it closed.
> is to set the your handle to null !!
>
> PERL's garbage collection picks it up and voila! no extra processes
> hanging in memory.
Except you mean undef, right? There is no null in Perl. Even so, though,
undef does not call object destructors (i.e., DESTROY method), only
decrements the reference count, which hopefully means it wil get garbage
collected.
-- Brett
http://www.chapelperilous.net/~bmccoy/
---------------------------------------------------------------------------
I know not with what weapons World War III will be fought, but World
War IV will be fought with sticks and stones.
-- Albert Einstein