X-Git-Url: http://Server1/repobrowser/?p=xestiacalendar%2F.git;a=blobdiff_plain;f=source%2Fwidgets%2FXCCalendarList.cpp;h=92e7c5058a6334d1e671b54c9ca4c6d9101787a9;hp=9dae3fcf34a9d89a79b5fd7d918b0c9a0e491572;hb=902d948e5e45ad483c8e235690dda8f2bf596ad5;hpb=49cd1caba10366538e7f87181d2ff90b5c715693 diff --git a/source/widgets/XCCalendarList.cpp b/source/widgets/XCCalendarList.cpp index 9dae3fc..92e7c50 100644 --- a/source/widgets/XCCalendarList.cpp +++ b/source/widgets/XCCalendarList.cpp @@ -31,6 +31,19 @@ XCCalendarList::XCCalendarList(wxWindow *parent) XCCalendarList::~XCCalendarList(){ + // Delete the calendar lists. + + for (vector::iterator accountCtrlIter = accountControlList.begin(); + accountCtrlIter != accountControlList.end(); accountCtrlIter++){ + + delete *accountCtrlIter; + + } + + accountControlList.clear(); + + this->SetSizer(nullptr, true); + } void XCCalendarList::UpdateCalendarList(CalendarDataStorage *dataStorage){