Hi, Richard, On Wed, Feb 15, 2017 at 8:20 PM, Richard Hipp <d...@sqlite.org> wrote: > On 2/15/17, Igor Korot <ikoro...@gmail.com> wrote: >> >> Well, my question here is a bit different - if sqlite3_step () returns an >> error >> should the statement be released? >> > > You still need to invoke either sqlite3_finalize() or sqlite3_reset() > on the statement. Use sqlite3_finalize() if you will never use that > statement again, and sqlite3_reset() if you want to reuse it. Just be > cause it got an error on one go doesn' t mean that it cannot be > reused, if that is what you are asking.
Basically I was asking if the failure on the sqlite3_step() release the statement handle or not. So thank you for confirming it is not. Now I presume that calling sqlite3_finalize() on the NULL handle is safe? Because I am planning to call this function only once - after the loop. Thank you. > > -- > D. Richard Hipp > d...@sqlite.org > _______________________________________________ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users