I did some testing that simply put database connection and disconnection in a loop and I watched the resident memory requirement of the program increase. Given that it was a DBD driver, I decided it was too complicated to debug. I saw, for example, that error messages are freed when they need to be, etc... So I wrote my own code that didn't rely on DBD. I put this bug on the list in the hope that the memory issues are resolved. Now that I wrote my own, I understand how to debug memory leaks in PERL XS modules so, if I have time, I'll look into this issue deeper.