[gnote] Fix memory leak if matches box is created but not shown when closing
- From: Aurimas Černius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Fix memory leak if matches box is created but not shown when closing
- Date: Tue, 5 Jan 2021 14:20:22 +0000 (UTC)
commit 6f25e99b8d0c202adde20a40492698e2b905a6aa
Author: Aurimas Černius <aurisc4 gmail com>
Date: Tue Jan 5 16:19:42 2021 +0200
Fix memory leak if matches box is created but not shown when closing
src/searchnoteswidget.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/searchnoteswidget.cpp b/src/searchnoteswidget.cpp
index c6477b74..bfad5f37 100644
--- a/src/searchnoteswidget.cpp
+++ b/src/searchnoteswidget.cpp
@@ -118,6 +118,9 @@ SearchNotesWidget::~SearchNotesWidget()
if(m_notebook_list_context_menu) {
delete m_notebook_list_context_menu;
}
+ if(m_no_matches_box) {
+ delete m_no_matches_box;
+ }
}
Glib::ustring SearchNotesWidget::get_name() const
@@ -1034,7 +1037,7 @@ void SearchNotesWidget::no_matches_found_action()
no_matches_found->set_hexpand(true);
no_matches_found->set_vexpand(true);
no_matches_found->show_all();
- m_no_matches_box = manage(new Gtk::Grid);
+ m_no_matches_box = new Gtk::Grid;
m_no_matches_box->attach(*no_matches_found, 0, 0, 1, 1);
m_no_matches_box->show();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]