Browse Source

update destructors

CPP-GTK4
yggverse 4 months ago
parent
commit
aa35a91923
  1. 13
      src/app/browser/header.cpp
  2. 6
      src/app/browser/main.cpp
  3. 9
      src/app/browser/main/tab/page/navbar.cpp
  4. 6
      src/app/browser/main/tab/page/navbar/history.cpp

13
src/app/browser/header.cpp

@ -28,19 +28,6 @@ Header::Header() @@ -28,19 +28,6 @@ Header::Header()
Header::~Header()
{
// Menu
remove(
* menu
);
delete menu;
menu = nullptr;
// Tab
remove(
* tab
);
delete tab;
tab = nullptr;
}

6
src/app/browser/main.cpp

@ -24,13 +24,7 @@ Main::Main() @@ -24,13 +24,7 @@ Main::Main()
Main::~Main()
{
remove(
* tab
);
delete tab;
tab = nullptr;
}
void Main::tab_append()

9
src/app/browser/main/tab/page/navbar.cpp

@ -83,7 +83,14 @@ Navbar::Navbar() @@ -83,7 +83,14 @@ Navbar::Navbar()
);
}
Navbar::~Navbar() = default;
Navbar::~Navbar()
{
delete base;
delete bookmark;
delete history;
delete request;
delete update;
};
// Actions
void Navbar::refresh()

6
src/app/browser/main/tab/page/navbar/history.cpp

@ -23,4 +23,8 @@ History::History() @@ -23,4 +23,8 @@ History::History()
);
}
History::~History() = default;
History::~History()
{
delete back;
delete forward;
};

Loading…
Cancel
Save