We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b6768ea commit 0f46197Copy full SHA for 0f46197
hdr/sqlite_modern_cpp.h
@@ -282,8 +282,10 @@ namespace sqlite {
282
sqlite3* tmp = nullptr;
283
auto ret = sqlite3_open16(db_name.data(), &tmp);
284
if(ret != SQLITE_OK) exceptions::throw_sqlite_error(ret);
285
- _db = std::shared_ptr<sqlite3>(tmp, [=](sqlite3* ptr) { sqlite3_close_v2(ptr); });
286
- //_db.reset(tmp, sqlite3_close); // alternative close. (faster?)
+
+ _db = std::shared_ptr<sqlite3>(tmp, [=](sqlite3* ptr) { sqlite3_close_v2(ptr); }); // this will close the connection eventually when no longer needed.
287
288
+ //_db.reset(tmp, sqlite3_close); // alternative close. (faster?)
289
}
290
291
database(std::string const & db_name):
0 commit comments