Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
widgets: Cleanup objects in destructors and minor code cleanup
[xestiacalendar/.git] / source / widgets / XCCalendarList.cpp
index 9dae3fc..92e7c50 100644 (file)
@@ -31,6 +31,19 @@ XCCalendarList::XCCalendarList(wxWindow *parent)
 
 XCCalendarList::~XCCalendarList(){
        
+       // Delete the calendar lists.
+       
+       for (vector<XCCalendarListAccountCtrl*>::iterator accountCtrlIter = accountControlList.begin();
+               accountCtrlIter != accountControlList.end(); accountCtrlIter++){
+               
+               delete *accountCtrlIter;
+                       
+       }
+       
+       accountControlList.clear();
+       
+       this->SetSizer(nullptr, true);
+       
 }
 
 void XCCalendarList::UpdateCalendarList(CalendarDataStorage *dataStorage){
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy