From af6b1efe327db7d0f037a774a238e89fba8fcb43 Mon Sep 17 00:00:00 2001 From: yggverse Date: Sat, 17 Aug 2024 18:23:47 +0300 Subject: [PATCH] cleanup heap objects --- src/app/browser/main/tab.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/app/browser/main/tab.cpp b/src/app/browser/main/tab.cpp index 2b6e688b..efbeab63 100644 --- a/src/app/browser/main/tab.cpp +++ b/src/app/browser/main/tab.cpp @@ -57,11 +57,21 @@ void Tab::append( void Tab::close( int number ) { + auto page = get_nth_page( + number + ); + + auto label = get_tab_label( + * page + ); + + delete page; + delete label; + remove_page( number ); - // @TODO clean memory // @TODO fix GtkGizmo reported min height, but sizes must be >= 0 }