I'm using sqlite_reset at end of each loop. My understanding is that's the same as if I finalized it and setup a new sqlite3_stmt. Is that not the case?
On Sat, Jul 26, 2008 at 1:46 PM, Igor Tandetnik <[EMAIL PROTECTED]> wrote: > "Ben Smith" <[EMAIL PROTECTED]> wrote in > message > news:[EMAIL PROTECTED] >> if (sqlite3_prepare_v2(db, sql, -1, &init_statement, NULL) != >> SQLITE_OK) { >> >> int y = 0; >> for(y=0;y<1000;++y){ >> >> if (sqlite3_prepare_v2(db, sqltwo, -1, &init_statement, NULL) != >> SQLITE_OK) { >> } >> >> sqlite3_finalize(init_statement); > > Your program makes 1001 sqlite3_prepare_v2 calls, but only one > sqlite3_finalize call. You leak 1000 prepared statements. > > Igor Tandetnik > > > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- Ben Smith Founder / CSA WBP SYSTEMS http://www.wbpsystems.com _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users