]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix memory leak in wxPanel::SetBackgroundBirmap() in wxMSW.
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 18 Jul 2011 19:36:31 +0000 (19:36 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 18 Jul 2011 19:36:31 +0000 (19:36 +0000)
The brush allocated for the bitmap was never freed, do free it in dtor.

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

include/wx/msw/panel.h
src/msw/panel.cpp

index 5073fe30baddb903d80e5c32dd84fc0faa3ef737..4761192d66dd594f60a01a669a2cd920c69682e2 100644 (file)
@@ -34,6 +34,8 @@ public:
         Create(parent, winid, pos, size, style, name);
     }
 
+    virtual ~wxPanel();
+
     // This is overridden for MSW to return true for all panels that are child
     // of a window with themed background (such as wxNotebook) which should
     // show through the child panels.
index e5b57eeb3af095b1115568f02064ac8a3f4b5025..c502caf9f5655145b01dddde65365ce11ed00b91 100644 (file)
 // implementation
 // ============================================================================
 
+wxPanel::~wxPanel()
+{
+    delete m_backgroundBrush;
+}
+
 bool wxPanel::HasTransparentBackground()
 {
     for ( wxWindow *win = GetParent(); win; win = win->GetParent() )