Re: [sqlite] Memory leak with sqlite3_exec on qnx 6.4.1

2009-06-29 Thread Greg Morehead
, June 29, 2009 12:06 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] Memory leak with sqlite3_exec on qnx 6.4.1 > So it seems by best bet is to close and open the connection once every 5 > minutes or so? While this might "work", I don't think you should reso

Re: [sqlite] Memory leak with sqlite3_exec on qnx 6.4.1

2009-06-29 Thread Simon Slavin
On 29 Jun 2009, at 1:11pm, Greg Morehead wrote: > So it seems by best bet is to close and open the connection once > every 5 minutes or so? No. The library is unlikely to have a leak of that kind in. Are you certain that what you're seeing is a real leak ? If so, the leak may be in your

Re: [sqlite] Memory leak with sqlite3_exec on qnx 6.4.1

2009-06-29 Thread Eric Minbiole
> So it seems by best bet is to close and open the connection once every 5 > minutes or so? While this might "work", I don't think you should resort to that. As Kees noted earlier, there will be performance drawbacks if you close/re-open the database. As others have indicated, the heap growth

Re: [sqlite] Memory leak with sqlite3_exec on qnx 6.4.1

2009-06-29 Thread Jay A. Kreibich
ilto:sqlite-users-boun...@sqlite.org]on Behalf Of Jay A. Kreibich > Sent: Friday, June 26, 2009 5:32 PM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] Memory leak with sqlite3_exec on qnx 6.4.1 > > > On Fri, Jun 26, 2009 at 05:07:16PM -0400, Greg Morehead scratched on t

Re: [sqlite] Memory leak with sqlite3_exec on qnx 6.4.1

2009-06-29 Thread Greg Morehead
qlite] Memory leak with sqlite3_exec on qnx 6.4.1 On Fri, Jun 26, 2009 at 05:07:16PM -0400, Greg Morehead scratched on the wall: > > If I close then reopen the database all my memory is recovered. > > Is this by design??? I was intending on keeping a connection open most of > t

Re: [sqlite] Memory leak with sqlite3_exec on qnx 6.4.1

2009-06-29 Thread Greg Morehead
: [sqlite] Memory leak with sqlite3_exec on qnx 6.4.1 On Fri, 26 Jun 2009 17:07:16 -0400, "Greg Morehead" wrote: > >If I close then reopen the database all my memory is recovered. > >Is this by design??? Yes, what you see is probably the page cache. >I was intendin

Re: [sqlite] Memory leak with sqlite3_exec on qnx 6.4.1

2009-06-26 Thread Jay A. Kreibich
On Fri, Jun 26, 2009 at 05:07:16PM -0400, Greg Morehead scratched on the wall: > > If I close then reopen the database all my memory is recovered. > > Is this by design??? I was intending on keeping a connection open most of > time. Are you sure you're not looking at the page cache? -j

Re: [sqlite] Memory leak with sqlite3_exec on qnx 6.4.1

2009-06-26 Thread Kees Nuyt
On Fri, 26 Jun 2009 17:07:16 -0400, "Greg Morehead" wrote: > >If I close then reopen the database all my memory is recovered. > >Is this by design??? Yes, what you see is probably the page cache. >I was intending on keeping a connection open most of time. That's a good idea, for at least

Re: [sqlite] Memory leak with sqlite3_exec on qnx 6.4.1

2009-06-26 Thread Greg Morehead
, June 26, 2009 4:41 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] Memory leak with sqlite3_exec on qnx 6.4.1 FYI. I replaced the sqlite3_exec call with sqlite3_prepare_v2, sqlite3_step, sqlite3_finalize. Same results. -Original Message- From: sqlite-users-boun

Re: [sqlite] Memory leak with sqlite3_exec on qnx 6.4.1

2009-06-26 Thread Greg Morehead
Discussion of SQLite Database Subject: Re: [sqlite] Memory leak with sqlite3_exec on qnx 6.4.1 Based on the documentation in the link you sent I should only need to call free if there was an error message. But, since there is no harm in calling sqlite3_free on a null pointer I moved it out of the if

Re: [sqlite] Memory leak with sqlite3_exec on qnx 6.4.1

2009-06-26 Thread Greg Morehead
: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org]on Behalf Of Ribeiro, Glauber Sent: Friday, June 26, 2009 4:17 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] Memory leak with sqlite3_exec on qnx 6.4.1 I took only a quick look, but it seems to me that

Re: [sqlite] Memory leak with sqlite3_exec on qnx 6.4.1

2009-06-26 Thread Greg Morehead
n the much larger real db's I am planning on using. -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org]on Behalf Of D. Richard Hipp Sent: Friday, June 26, 2009 3:58 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] M

Re: [sqlite] Memory leak with sqlite3_exec on qnx 6.4.1

2009-06-26 Thread Ribeiro, Glauber
, June 26, 2009 2:49 PM To: sqlite-users@sqlite.org Subject: [sqlite] Memory leak with sqlite3_exec on qnx 6.4.1 The extremely simple app below leaks. What am I doing wrong?? Please help. #include #include #include "stdio.h" #include "sqlite3.h" #include #define TFQ_SQL_

Re: [sqlite] Memory leak with sqlite3_exec on qnx 6.4.1

2009-06-26 Thread D. Richard Hipp
On Jun 26, 2009, at 3:49 PM, Greg Morehead wrote: > The extremely simple app below leaks. What am I doing wrong?? > Please help. How do you know it is leaking memory? How are you measuring? > > > #include > #include > #include "stdio.h" > #include "sqlite3.h" > #include > > #define TFQ_

[sqlite] Memory leak with sqlite3_exec on qnx 6.4.1

2009-06-26 Thread Greg Morehead
The extremely simple app below leaks. What am I doing wrong?? Please help. #include #include #include "stdio.h" #include "sqlite3.h" #include #define TFQ_SQL_DB_NAME "/powerblock/datalog/TFQ-test.db" #define _TABLE_NAME "sqltest" int main(int argc, char *argv[]) { char sql[1024];