I woke up about 2am this morning with a hankering to fix a memory leak... strange.
Sqlite 3.2.7 had been leaking memory like a sieve. I guessed (correctly) that there was no problem with the library, and that the problem was with the C++ wrapper that I am using: CppSQLite3. Actually, the problem wasn't directly caused by any flaw in CppSQLite3. The sqlite_finalize function is called from the deconstructor of the CppSQLite3Statement object. However, when compiled with GCC 4.0.0. (with the /O2 optimization option) this function had no effect causing sqlite3 to leak memory. I made a one line addition to my code base, explicitly calling CppSQLite3Statement::finalize(), which in turn calls sqlite_finalize(), and the leak went away.
The end result for me is a major major improvement in my program's stability. There is still a bit of a leak somewhere - I would guess in zlib, but I haven't tracked it down all the way yet.
