Shakthi Kannan <> was heard to say:

> int main() {
>   dbi_conn conn;
>   while (1) {
>     dbi_initialize(NULL);
>     dbi_shutdown();
>   }
>   return 0;
> }


I'll test your code on my dev box as soon as time permits. libdbi is  
not supposed to lose memory under any circumstances. I'll have to see  
the valgrind output as sometimes the leak is not within libdbi itself,  
but within a driver or the client library (if the driver forgets to  
free memory allocated by the library).

In any case, I'd suggest to modify your code. dbi_initialize() is  
supposed to be run once per process, so the following is more  

int main() {
   dbi_conn conn;

   while (1) {



   return 0;

If it is indeed libdbi that leaks memory, it won't do so in every  
cycle of your loop.


Markus Hoenicka
AQ score 38

BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
libdbi-users mailing list

Reply via email to