mirror of
https://github.com/zealdocs/zeal.git
synced 2026-08-29 08:34:50 +08:00
fix(util): use sqlite3_close_v2 in Database
This commit is contained in:
@@ -133,7 +133,10 @@ QString Database::lastError() const
|
||||
|
||||
void Database::close()
|
||||
{
|
||||
sqlite3_close(m_db);
|
||||
// Use the _v2 variant so that any prepared statements still alive at
|
||||
// shutdown defer the actual deallocation instead of returning SQLITE_BUSY
|
||||
// and leaking the connection.
|
||||
sqlite3_close_v2(m_db);
|
||||
m_db = nullptr;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user