question about sqlite3_close_v2 call!
If i call sqlite3_close_v2 and it return OK then quit process, but there is some statements not finalized. In this case journal file and wal-shm file will be safely handled like I call sqlite3_close and return SQLITE_OK?
I open database in single process only.
If either (1) Your single (and therefor auto-transacted) statements completed past the stepping phase (returning SQLITE_DONE), or (2) your multiple statement sets, bounded by transaction begin and end, completed (in the same sense), then the persistent data will be handled safely (where that means adhering to the ACID promise.) This includes effects upon the auxiliary files that SQLite uses to deliver on that promise.
The main penalty for leaving unfinalized statements lying around is memory leaks and reports thereof which responsible programmers generally heed and cure.