On 23 Apr 2010, at 1:16pm, liubin liu wrote: > But I test the routine of sqlite3_prepare_v2() + sqlite3_step() + > sqlite3_finalize() in my real code. > > And the test result say when sqlite3_step() is shadowed, the leak is zero. > When doing the sqlite3_step(), the leak is about 1k byte. And another > curious phenomenon is that while there are many datas in the data file, the > leak is more bigger than while there are few datas in the data file.
It is okay for both sqlite3_prepare_v2() and sqlite3_step() to use memory, but all the memory they use should be released by sqlite3_finalize(). So ignore any information you get until you have correctly called the _finalize() function. Similarly, opening a database may use up memory, but calling _close() should free it all. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users