git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33282
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
unsigned char *m_alpha;
bool m_ok;
+
+ // if true, m_data is pointer to static data and shouldn't be freed
bool m_static;
+ // same as m_static but for m_alpha
+ bool m_staticAlpha;
+
#if wxUSE_PALETTE
wxPalette m_palette;
#endif // wxUSE_PALETTE
m_hasMask = false;
m_ok = false;
- m_static = false;
+ m_static =
+ m_staticAlpha = false;
}
wxImageRefData::~wxImageRefData()
{
- if (!m_static)
- {
+ if ( !m_static )
free( m_data );
+ if ( !m_staticAlpha )
free( m_alpha );
- }
}
wxList wxImage::sm_handlers;
free(M_IMGDATA->m_alpha);
M_IMGDATA->m_alpha = alpha;
- M_IMGDATA->m_static = static_data;
+ M_IMGDATA->m_staticAlpha = static_data;
}
unsigned char *wxImage::GetAlpha() const