> Is lowering the PRAGMA cache_size a good way to fix this? Yes, it's the only way to fix this. Though IIRC you cannot lower it below 10, so 10 pages will be always stored in memory. OTOH you can implement your own version of page cache that will not leave pages in memory at all (for more information see http://www.sqlite.org/c3ref/pcache_methods.html).
> I see now I have probably missed some basic rules > of using SQLite. I just created a Database class with constructor > opening a database connection and storing a sqlite3* pointer and > destructor closing this connection. I think you've implemented it correctly. I doubt you want to open and close connection for executing of each statement because it's some serious overhead. Pavel On Thu, Jul 30, 2009 at 8:25 AM, Maciej Miszczak<[email protected]> wrote: > Pavel, you're great! There's nothing better than to just ask the right > people. Calling sqlite3_close after the mentioned function solved the > problem. By the way I got something like this: >> - 0x0005e688 Free 28 was never alloc'd 0x400f3ec4 >> - 0x0005e750 Free 29 was never alloc'd 0x400f3ec4 >> - 0x0005e768 Free 30 was never alloc'd 0x400f3ec4 >> - 0x0005e788 Free 31 was never alloc'd 0x400f3ec4 > and so on, but I think there's nothing to worry about. My database has > the page_size of 1024. I see now I have probably missed some basic rules > of using SQLite. I just created a Database class with constructor > opening a database connection and storing a sqlite3* pointer and > destructor closing this connection. In this situation every > Database::execute call produced, as you said, not freed cache. It seems > to be the cause of all my problems with "leaks". Is lowering the PRAGMA > cache_size a good way to fix this? My database works on embedded > platform with 64MB of RAM. > > Thanks again, cheers, > Maciej > _______________________________________________ > sqlite-users mailing list > [email protected] > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

