From 7892e035c9a247715635ec82f139741d20d07358 Mon Sep 17 00:00:00 2001 From: Steve Lamerton Date: Wed, 28 Sep 2011 19:44:35 +0000 Subject: [PATCH] Delete the menu on close in the wxWebView sample. Fixes most of the memory leaks. See #13500 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69214 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/webview/webview.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/samples/webview/webview.cpp b/samples/webview/webview.cpp index bcadb595b6..4f679f872b 100644 --- a/samples/webview/webview.cpp +++ b/samples/webview/webview.cpp @@ -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; -- 2.45.2