From 96413683c5e482ef51e0b5a29c4f15ea33326598 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 23 Sep 2014 17:41:55 +0000 Subject: [PATCH] free the data in deconstructor that created in constructor git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77815 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/x11/palette.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/x11/palette.cpp b/src/x11/palette.cpp index 7d724bc41a..0151b2c3b5 100644 --- a/src/x11/palette.cpp +++ b/src/x11/palette.cpp @@ -83,6 +83,9 @@ wxPaletteRefData::~wxPaletteRefData() for (node = m_palettes.GetFirst(); node; node = next) { wxXPalette *c = (wxXPalette *)node->GetData(); unsigned long *pix_array = c->m_pix_array; + unsigned char *col_red = c->m_red; + unsigned char *col_green = c->m_green; + unsigned char *col_blue = c->m_blue; Colormap cmap = (Colormap) c->m_cmap; bool destroyable = c->m_destroyable; int pix_array_n = c->m_pix_array_n; @@ -101,6 +104,9 @@ wxPaletteRefData::~wxPaletteRefData() } #endif delete [] pix_array; + delete [] col_red; + delete [] col_green; + delete [] col_blue; } if (destroyable)