]> git.saurik.com Git - wxWidgets.git/commitdiff
Delete the menu on close in the wxWebView sample. Fixes most of the memory leaks.
authorSteve Lamerton <steve.lamerton@gmail.com>
Wed, 28 Sep 2011 19:44:35 +0000 (19:44 +0000)
committerSteve Lamerton <steve.lamerton@gmail.com>
Wed, 28 Sep 2011 19:44:35 +0000 (19:44 +0000)
See #13500

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69214 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/webview/webview.cpp

index bcadb595b6904a425b881a2eedc4d32498193a95..4f679f872b3b6140fe09ce569874a922d72ebccc 100644 (file)
@@ -67,6 +67,7 @@ class WebFrame : public wxFrame
 {
 public:
     WebFrame();
+    ~WebFrame();
 
     void OnAnimationTimer(wxTimerEvent& evt);
     void UpdateState();
@@ -357,6 +358,11 @@ WebFrame::WebFrame() : wxFrame(NULL, wxID_ANY, "wxWebView Sample")
             wxCommandEventHandler(WebFrame::OnLoadScheme),  NULL, this );
 }
 
+WebFrame::~WebFrame()
+{
+    delete m_tools_menu;
+}
+
 void WebFrame::OnAnimationTimer(wxTimerEvent& WXUNUSED(evt))
 {
     m_animation_angle += 15;