use shared_ptr for db

This commit is contained in:
yggverse 2024-08-12 12:39:55 +03:00
parent a8df7e1ebe
commit 3e38d69fb7
2 changed files with 6 additions and 3 deletions

View File

@ -7,7 +7,7 @@ int main(
char * argv[]
) {
// Init app
auto app = Gtk::Application::create(
const Glib::RefPtr<Gtk::Application> app = Gtk::Application::create(
"io.github.yggverse.Yoda"
);
@ -27,8 +27,10 @@ int main(
);
// Init profile
auto db = lib::Database(
"database.sqlite3"
const std::shared_ptr<lib::Database> db(
new lib::Database(
"database.sqlite3"
)
);
// Launch browser component

View File

@ -1,4 +1,5 @@
#include <glibmm.h>
#include <memory>
int main(
int argc,