Shakthi Kannan was heard to say:
> int main() {
> dbi_conn conn;
>
> while (1) {
> dbi_initialize(NULL);
>
[...]
>
> dbi_shutdown();
> }
>
> return 0;
> }
Hi,
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
appropriate:
int main() {
dbi_conn conn;
dbi_initialize(NULL);
while (1) {
[...]
}
dbi_shutdown();
return 0;
}
If it is indeed libdbi that leaks memory, it won't do so in every
cycle of your loop.
regards,
Markus
--
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38
--
BlackBerry® 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!
http://p.sf.net/sfu/rim-blackberry-1
___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users