Re: [sqlite] Does sqlite3_prepare() clean up after itself if it fails?

2008-03-03 Thread Scott Hess
On Mon, Mar 3, 2008 at 10:16 AM, Igor Tandetnik <[EMAIL PROTECTED]> wrote: > Jerry Krinock <[EMAIL PROTECTED]> wrote: > > The Blob Example [1] contains code [2] in which, if sqlite3_prepare() > > fails, the subsequent call to sqlite3_finalize() is skipped. Is this > > OK? > > If sqlite3_prepar

Re: [sqlite] Does sqlite3_prepare() clean up after itself if it fails?

2008-03-03 Thread Igor Tandetnik
Jerry Krinock <[EMAIL PROTECTED]> wrote: > The Blob Example [1] contains code [2] in which, if sqlite3_prepare() > fails, the subsequent call to sqlite3_finalize() is skipped. Is this > OK? If sqlite3_prepare fails, you don't get a valid sqlite3_stmt handle, so there's nothing to call sqlite3_fi

[sqlite] Does sqlite3_prepare() clean up after itself if it fails?

2008-03-03 Thread Jerry Krinock
The Blob Example [1] contains code [2] in which, if sqlite3_prepare() fails, the subsequent call to sqlite3_finalize() is skipped. Is this OK? Does sqlite3_prepare() free up any memory it may have allocated if it fails? I've read the documentation for these two functions but still don't