Chas Owens wrote:
>
> I am receiving a strange error on exiting a script: Attempt to free
> unreferenced scalar during global destruction. It only occurs after I
> make a DBI connection and run an SQL statement. I am undefing the
> statement handle and disconnecting the database handle. Does anyone
> have a clue what this might be?
perldoc perldiag
[snip]
Attempt to free unreferenced scalar
(W internal) Perl went to decrement the reference
count of a scalar to see if it would go to 0, and dis�
covered that it had already gone to 0 earlier, and
should have been freed, and in fact, probably was
freed. This could indicate that SvREFCNT_dec() was
called too many times, or that SvREFCNT_inc() was
called too few times, or that the SV was mortalized
when it shouldn't have been, or that memory has been
corrupted.
Are you doing "undef $scalar" in your code? If so, don't. You should
_never_ have to use undef in this manner. Use my() to create a lexical
scope and let perl take care it.
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]