Esempio n. 1
0
PluginManager::~PluginManager()
{
    Table::iterator it;
    while ((it = m_table.begin()) != m_table.end())
    {
        Plugin *plugin = it->second;
        m_table.erase(it);
        plugin->destroy();
    }
}
 // do not forget to free all allocated resources
 // otherwise define the destructor with an empty body
 virtual ~DecoratorImtFactory() {
   if (_plugin != 0) {
     if (_base) _plugin->destroy(_base);
     delete _plugin;
   }
 }