Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - sqlite3 memory leak question.: (4 Items)
   
sqlite3 memory leak question.  
I have included the three sqlite3 files (sqlite3.c sqlite3.h & sqlite3ext.h) directly in my source code for a project.  
These were downloaded directly from sqlite.org.

Everything compiles and runs, however there is a significant memory leak with every insert using sqlite3_exec().

Has anybody seen this?  Should I be using code from the pkg_src directory instead??

Any input from somebody who has/is successfully using sqlite on qnx would be greatly appreciated.

Thanks,
Greg
RE: sqlite3 memory leak question.  

Glad to see you figured it out :)

http://www.mail-archive.com/sqlite-users@sqlite.org/msg43916.html

-seanb

-----Original Message-----
From: Greg Morehead [mailto:community-noreply@qnx.com]
Sent: Fri 6/26/2009 4:07 PM
To: general-pkgsrc
Subject: sqlite3 memory leak question.
 
I have included the three sqlite3 files (sqlite3.c sqlite3.h & sqlite3ext.h) directly in my source code for a project.  
These were downloaded directly from sqlite.org.

Everything compiles and runs, however there is a significant memory leak with every insert using sqlite3_exec().

Has anybody seen this?  Should I be using code from the pkg_src directory instead??

Any input from somebody who has/is successfully using sqlite on qnx would be greatly appreciated.

Thanks,
Greg


_______________________________________________
General
http://community.qnx.com/sf/go/post32637


Attachment: Text winmail.dat 2.78 KB
Re: RE: sqlite3 memory leak question.  
FYI, There is no memory leaks.

I had not fully understood the cache systems implemented by sqlite.  Once the cache levels were reached the memory usage
 leveled off.

Closing the DB connection released the cache memory.
Re: sqlite3 memory leak question.  
Haven't had this problem (QNX 6.2.1B, latest SQLite - although built manually and not through pkg_src).

Make sure you are checking the error message char* after every call and disposing of it using sqlite3_free().