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()
Header::~Header() Header::~Header()
{ {
// Menu
remove(
* menu
);
delete menu; delete menu;
menu = nullptr;
// Tab
remove(
* tab
);
delete tab; delete tab;
tab = nullptr;
} }

6
src/app/browser/main.cpp

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

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

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

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

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

Loading…
Cancel
Save