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 13b5c9e commit b867b5eCopy full SHA for b867b5e
hdr/sqlite_modern_cpp.h
@@ -296,9 +296,9 @@ namespace sqlite {
296
database(std::u16string const & db_name): _db(nullptr) {
297
sqlite3* tmp = nullptr;
298
auto ret = sqlite3_open16(db_name.data(), &tmp);
299
+ _db = std::shared_ptr<sqlite3>(tmp, [=](sqlite3* ptr) { sqlite3_close_v2(ptr); }); // this will close the connection eventually when no longer needed.
300
if(ret != SQLITE_OK) exceptions::throw_sqlite_error(ret);
301
- _db = std::shared_ptr<sqlite3>(tmp, [=](sqlite3* ptr) { sqlite3_close_v2(ptr); }); // this will close the connection eventually when no longer needed.
302
303
//_db.reset(tmp, sqlite3_close); // alternative close. (faster?)
304
}
0 commit comments