[gtkmm-documentation] Main Menu example: Fix a leak



commit e3e26e5e0448c3aebf3e80facf8319218f3cec57
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu Sep 26 21:00:28 2013 +0200

    Main Menu example: Fix a leak

 examples/book/menus/main_menu/examplewindow.cc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/examples/book/menus/main_menu/examplewindow.cc b/examples/book/menus/main_menu/examplewindow.cc
index 72813cb..cd47fae 100644
--- a/examples/book/menus/main_menu/examplewindow.cc
+++ b/examples/book/menus/main_menu/examplewindow.cc
@@ -194,7 +194,7 @@ ExampleWindow::ExampleWindow()
     g_warning("GMenu not found");
 
   //Menubar:
-  Gtk::MenuBar* pMenubar = new Gtk::MenuBar(gmenu);
+  Gtk::MenuBar* pMenubar = Gtk::manage(new Gtk::MenuBar(gmenu));
   m_Box.pack_start(*pMenubar, Gtk::PACK_SHRINK);
 
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]