Subject says it all.  I've got some reasonably complicated database code
which utilizes DBI and DBD::Oracle (latest versions as of today) that
appears to be leaking SV's, if Apache::Leak is to be believed:

ENTER: 59526 SVs
(lots of stuff deleted)
LEAVE: 61113 SVs
ENTER: 61113 SVs
(more stuff deleted)
LEAVE: 61190 SVs
!!! 77 SVs leaked !!!

Now, I don't really understand how it comes up with 77 SVs leaked, since it
appears that the first ENTER/LEAVE leaked some as well....but that's not my
real question.

Is there a way to track down where the leaks are occurring without placing
debugging messages everywhere?  77 SVs isn't a lot, but when this many SVs
are leaked per iteration, and you've got about a million rows to rip
through, it adds up to a *lot*.

Also, and this is more of a general perl question than a DBI question, but
how does one get leaking SV's with pure perl code?  I thought perl was
supposed to take care of cleaning up unused references as soon as they go
out of scope.  Or, do you only get leaking SVs when XS code is involved?

Thanks!

    -klm.

-------------------------
Kenneth L. Miller
Consultant, Shetland Software Services Inc.
[EMAIL PROTECTED]


Reply via email to