I believe there's a memory leak. valgrind reports a large block (around 73k) of 
memory lost at line 847 in sqlite_module.cpp for most of the tests. This is the 
call to sqlite3_open_v2(). After a little debugging, I see that sqlite3_close() 
is being called in ConnMap::destroy(). However, according to 
http://www.sqlite.org/c3ref/close.html , calling sqlite3_close() defers all 
memory cleanup if there are any outstanding prepared statement objects.

Prepared statements are cleaned up with the call to sqlite3_finalize() in 
StmtMap::destroy(); however, this function does not get called when executing 
one of the test queries. Hence, the entire database connection is leaked.
Your team Zorba Coders is subscribed to branch lp:zorba.

Mailing list: https://launchpad.net/~zorba-coders
Post to     : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp

Reply via email to