Thanks for the clarification.

Adam



On Sat, Oct 27, 2012 at 12:13 PM, Simon Slavin <slav...@bigfraud.org> wrote:
>
> On 27 Oct 2012, at 6:36am, Dan Kennedy <danielk1...@gmail.com> wrote:
>
>> 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.
>
> Oh, right.  It releases the memory the statement was using.  Sorry.
>
> Simon.
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users



-- 
VerifEye Technologies Inc.
905-948-0015x245
151 Whitehall Dr, Unit 2
Markham ON, L3R 9T1
Canada
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to