On 10 Nov 2018, at 1:57pm, Simon Slavin <slav...@bigfraud.org> wrote:

> Do you test the code returned by sqlite_close() to make sure it is returning 
> SQLITE_OK and not an error ?

Sorry, I forgot a possibility.

If your application has a statement which is not terminated, it cannot close 
the database.  For example, you might do

sqlite_prepare(), sqlite_step(), sqlite_step(), sqlite_step()

the last step might return SQLITE_DONE.  But the SQLite library doesn't release 
the resources until you call either sqlite_reset() or sqlite_finalize().  And 
one of the resources is the database connection.

So if you use sqlite_step() anywhere, make sure you finalize after the last 
step.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to