X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fwidgets%2FXCCalendarList.cpp;h=92e7c5058a6334d1e671b54c9ca4c6d9101787a9;hb=8940e6e91652527a21000b2ba2d0c2618c562004;hp=9dae3fcf34a9d89a79b5fd7d918b0c9a0e491572;hpb=aae28b3b085110c673f108eb90537aca4e264e76;p=xestiacalendar%2F.git 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){