X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9e96e16fe0bc7af32d329c965ad110a3e5be5ad8..e22fa4d7b2608c333d8ffdb9807973b6967a2087:/src/stc/PlatWX.cpp?ds=sidebyside diff --git a/src/stc/PlatWX.cpp b/src/stc/PlatWX.cpp index fbc9ce00a3..8f4abde6bd 100644 --- a/src/stc/PlatWX.cpp +++ b/src/stc/PlatWX.cpp @@ -86,8 +86,7 @@ Palette::Palette() { Palette::~Palette() { Release(); - delete [] entries; - entries = 0; + wxDELETEA(entries); } void Palette::Release() { @@ -1144,14 +1143,8 @@ ListBoxImpl::ListBoxImpl() } ListBoxImpl::~ListBoxImpl() { - if (imgList) { - delete imgList; - imgList = NULL; - } - if (imgTypeMap) { - delete imgTypeMap; - imgTypeMap = NULL; - } + wxDELETE(imgList); + wxDELETE(imgTypeMap); } @@ -1329,14 +1322,8 @@ void ListBoxImpl::RegisterImage(int type, const char *xpm_data) { } void ListBoxImpl::ClearRegisteredImages() { - if (imgList) { - delete imgList; - imgList = NULL; - } - if (imgTypeMap) { - delete imgTypeMap; - imgTypeMap = NULL; - } + wxDELETE(imgList); + wxDELETE(imgTypeMap); if (wid) GETLB(wid)->SetImageList(NULL, wxIMAGE_LIST_SMALL); }