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:
@@ -83,6 +83,9 @@ wxPaletteRefData::~wxPaletteRefData()
|
|||||||
for (node = m_palettes.GetFirst(); node; node = next) {
|
for (node = m_palettes.GetFirst(); node; node = next) {
|
||||||
wxXPalette *c = (wxXPalette *)node->GetData();
|
wxXPalette *c = (wxXPalette *)node->GetData();
|
||||||
unsigned long *pix_array = c->m_pix_array;
|
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;
|
Colormap cmap = (Colormap) c->m_cmap;
|
||||||
bool destroyable = c->m_destroyable;
|
bool destroyable = c->m_destroyable;
|
||||||
int pix_array_n = c->m_pix_array_n;
|
int pix_array_n = c->m_pix_array_n;
|
||||||
@@ -101,6 +104,9 @@ wxPaletteRefData::~wxPaletteRefData()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
delete [] pix_array;
|
delete [] pix_array;
|
||||||
|
delete [] col_red;
|
||||||
|
delete [] col_green;
|
||||||
|
delete [] col_blue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (destroyable)
|
if (destroyable)
|
||||||
|
Reference in New Issue
Block a user