00001 // ////////////////////////////////////////////////////////////////////// 00002 // Import section 00003 // ////////////////////////////////////////////////////////////////////// 00004 // C 00005 #include <assert.h> 00006 // TRAVEL-CCM 00007 #include <airsched/service/ServiceAbstract.hpp> 00008 #include <airsched/factory/FacServiceAbstract.hpp> 00009 00010 namespace AIRSCHED { 00011 00012 // ////////////////////////////////////////////////////////////////////// 00013 FacServiceAbstract::~FacServiceAbstract() { 00014 clean (); 00015 } 00016 00017 // ////////////////////////////////////////////////////////////////////// 00018 void FacServiceAbstract::clean() { 00019 for (ServicePool_T::iterator itService = _pool.begin(); 00020 itService != _pool.end(); itService++) { 00021 ServiceAbstract* currentService_ptr = *itService; 00022 assert (currentService_ptr != NULL); 00023 00024 delete (currentService_ptr); currentService_ptr = NULL; 00025 } 00026 00027 // Empty the pool of Service Factories 00028 _pool.clear(); 00029 } 00030 00031 }