|Title:||sqlite_close doc should qualify advice|
|Last Modified:||2009-10-20 14:24:28|
|Version Found In:||3.6.0|
The advice in sqlite3_close doc to use sqlite3_next_stmt to close open statements should be more qualified. In my opinion it should be removed completely or suggested as a way of finding open statements if a close fails, but not used to finalize statements.
If the program had not been keeping track of statements then it would leak them anyway. If any extension module or other code is in use then it is quite possible that they have their own prepared statements and so the suggested code would result in a double free. One example module that does this is RTree.
drh added on 2009-10-20 14:24:28: