From: Vadim Zeitlin Date: Sun, 19 Nov 2006 15:14:14 +0000 (+0000) Subject: delete controls which are part of the calendar (even if they're siblings to it and... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/2c9fc05a460c447679979ccc25fc660989ef1bc8 delete controls which are part of the calendar (even if they're siblings to it and not its children) when the calender itself is deleted git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43526 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/calctrl.cpp b/src/generic/calctrl.cpp index 1b4e84226f..2fb1c41725 100644 --- a/src/generic/calctrl.cpp +++ b/src/generic/calctrl.cpp @@ -256,6 +256,14 @@ wxCalendarCtrl::~wxCalendarCtrl() { delete m_attrs[n]; } + + if ( !HasFlag(wxCAL_SEQUENTIAL_MONTH_SELECTION) ) + { + delete m_comboMonth; + delete m_staticMonth; + delete m_spinYear; + delete m_staticYear; + } } void wxCalendarCtrl::SetWindowStyleFlag(long style)