Jonas Sandman wrote:
> You are creating 100 prepared statements, which probably takes a lot of 
> memory.
> What you really want to do is probably create one statement, get all
> the data out of it, finalize it and then prepare the next statement
> and get THAT data etc.
>   
The posted code does not create 100 prepared statements. It creates just
one, fetches the data, finalizes the statement, then loops.

That being sad, it's impossible to tell the source of the memory usage
from the information supplied. How big are the tables? What are you
doing with the data after sqlite3_step? Are you sure it's leaking from
SQLite and not from your code?
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to