Please send emails like this to [EMAIL PROTECTED] - I've CC'd this reply there.
On Sun, Jan 25, 2004 at 11:54:15AM -0500, Michael Hoy wrote:
>
> Hi Tim,
>
> I'm the maintainer for DBD::DB2 and currently working on an issue that I'm
> hoping you shed some light on.
>
> Code snipplet:
>
> # Test DBI destroys handles when it goes out of scope
> {
> my $st = $dbh->prepare('Select deptnumb from hoymich.org where deptnumb > ?')
> || die;
> $st->execute(1);
> $st->finish();
> }
>
> When $st goes out of scope I was hoping that DBI will destroy our statement
> handle (dispatch to our destroy(sth) which will call our dbd_st_destroy),
> but it doesn't seem to be doing that.
> The DBI Trace shows this message:
>
> <> DESTROY ignored for outer handle DBI::st=HASH(0x19e5de4) (inner
> DBI::st=HASH(0x222d1c))
>
> Can you explain what this message means and what I need to do in order for
> the DBI to actually call our dbd_st_destroy method when the $st goes out of
> scope or replaced with a new handle?
Something is holding reference to the "inner" handle.
Perhaps a reference loop.
Tim.
p.s. I've made a note to add the ref count of the inner handle to that trace message.