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
This commit is contained in:
Vadim Zeitlin
2014-09-23 17:41:55 +00:00
parent c973dd7be5
commit 96413683c5

View File

@@ -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)