aboutsummaryrefslogtreecommitdiff
path: root/src/Toolbar.cc
diff options
context:
space:
mode:
authorsimonb <simonb>2006-04-24 13:34:14 (GMT)
committersimonb <simonb>2006-04-24 13:34:14 (GMT)
commitf6a072430d4de159e229d6172adc5ba5ae985512 (patch)
treee87832fba92188131c4e9441b72c0e9c03666660 /src/Toolbar.cc
parent731f0deaafff3a4fe4353bbfc421a5dc3d5a2337 (diff)
downloadfluxbox-f6a072430d4de159e229d6172adc5ba5ae985512.zip
fluxbox-f6a072430d4de159e229d6172adc5ba5ae985512.tar.bz2
fix memory leaks in menu code
Diffstat (limited to 'src/Toolbar.cc')
-rw-r--r--src/Toolbar.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Toolbar.cc b/src/Toolbar.cc
index 6384430..a863b3f 100644
--- a/src/Toolbar.cc
+++ b/src/Toolbar.cc
@@ -252,6 +252,7 @@ Toolbar::Toolbar(BScreen &scrn, FbTk::XLayer &layer, size_t width):
252 252
253 m_layermenu.setInternalMenu(); 253 m_layermenu.setInternalMenu();
254 m_placementmenu.setInternalMenu(); 254 m_placementmenu.setInternalMenu();
255 m_toolbarmenu.setInternalMenu();
255 setupMenus(); 256 setupMenus();
256 // add menu to screen 257 // add menu to screen
257 screen().addConfigMenu(_FBTEXT(Toolbar, Toolbar, "Toolbar", "title of toolbar menu item"), menu()); 258 screen().addConfigMenu(_FBTEXT(Toolbar, Toolbar, "Toolbar", "title of toolbar menu item"), menu());
@@ -287,6 +288,8 @@ Toolbar::~Toolbar() {
287 // remove menu items before we delete tools so we dont end up 288 // remove menu items before we delete tools so we dont end up
288 // with dangling pointers to old submenu items (internal menus) 289 // with dangling pointers to old submenu items (internal menus)
289 // from the tools 290 // from the tools
291 screen().removeConfigMenu(menu());
292
290 menu().removeAll(); 293 menu().removeAll();
291 294
292 deleteItems(); 295 deleteItems();