[odb-users] Memory leaks with odb/mysql/database.hxx

Boris Kolpackov boris at codesynthesis.com
Thu Mar 10 05:34:31 EST 2011


Hi Alexey,

Alexey Afanasyev <aphongka at gmail.com> writes:

> I am using boost/test which reports memory leaks in my odb project
> (static library). I tried to isolate the problematic area and it seems
> to be somewhere in odb/mysql/database.hxx. I created and empty test
> case but the test still reports memory leak until I remove #  include
> <odb/mysql/database.hxx>
> 
> I have not been able to locate the problem in the odb code yet. What
> could cause it?

This is very strange. The odb/mysql/database.hxx header contains class
declarations, so it is not clear to me how simply including it can
cause a memory leak. Does the test provide any pointers to where the
leak comes from (e.g., a stack trace)?

Also, which platform are you trying this on? If you are on Linux, you
may want to try valgrind. In fact, we extensively test every release
for memory leaks with this tool. So I would be very surprised if the
boost/test report is not bogus.

Boris



More information about the odb-users mailing list