On 10/27/2012 07:06 AM, Simon Slavin wrote:

On 26 Oct 2012, at 11:05pm, Clemens Ladisch<clem...@ladisch.de>
wrote:

Yes; sqlite3_finalize _always_ frees the statement.

And if the statement is already finalized (due to an earlier error,
perhaps) then it is a harmless noop.  So you can do it near the end
of your routine harmlessly.

That's a bit deceptive. Passing the same pointer to sqlite3_finalize()
twice is undefined behavior. You might get an SQLITE_MISUSE error, but
you also might get a segfault.


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

Reply via email to