...@sqlite.org on behalf of liubin liu
Sent: Fri 4/23/2010 9:19 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] Is there any memory leak in the code while being busy?
Thanks :)
But in my real code, the sqlite3_free(sql) is in the right place. So I think
that there are other reasons causing
the code's test result in my first post is :
pthread2: prepare: 0, p_stmt: 0xb6a00de0, errmsg: not an error
pthread2: step: 5, p_stmt: 0xb6a00de0, errmsg: database is locked
pthread2: finalize: 5, p_stmt: 0xb6a00de0, errmsg: database is locked
pthread2: finalize: 21, p_stmt:
users-boun...@sqlite.org on behalf of liubin liu
> Sent: Fri 4/23/2010 7:16 AM
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] Is there any memory leak in the code while being
> busy?
>
>
>
>
> sorry for multi-send the message.
>
> I just test the
tems
From: sqlite-users-boun...@sqlite.org on behalf of liubin liu
Sent: Fri 4/23/2010 7:16 AM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] Is there any memory leak in the code while being busy?
sorry for multi-send the message.
I just test the code again.
On 23 Apr 2010, at 1:16pm, liubin liu wrote:
> But I test the routine of sqlite3_prepare_v2() + sqlite3_step() +
> sqlite3_finalize() in my real code.
>
> And the test result say when sqlite3_step() is shadowed, the leak is zero.
> When doing the sqlite3_step(), the leak is about 1k byte. And an
sorry for multi-send the message.
I just test the code again. And sqlite3_finalize() may free the memory. I'm
wrong in the first post.
But I test the routine of sqlite3_prepare_v2() + sqlite3_step() +
sqlite3_finalize() in my real code.
And the test result say when sqlite3_step() is shadowed,
it is not necessary to send your question multible times... ;)
to answer: what makes you think that sqlite3_finalize can't
free the prepared statement ?
liubin liu wrote:
> Is there any memory leak in the code?
>
> Below is the code. Is there any memory leak in the pthread2?
>
> While pthread
Is there any memory leak in the code?
Below is the code. Is there any memory leak in the pthread2?
While pthread1 is using test.db exclusively, the sqlite3_prepare_v2() of
pthread2 still prepares the p_stmt pointer to a piece of memory malloced by
sqlite3_preapare_v2(). And then the sqlite3_fi
8 matches
Mail list logo