- factory[j] = NULL;
- // here we should locate ALL resources claimed by this module... and release them
- // for example commands
- log(DEBUG,"Erasing module vector...");
- for (std::vector<ircd_module*>::iterator t = factory.begin(); t != factory.end(); t++)
- {
- if (*t == NULL)
- {
- factory.erase(t);
- break;
- }
- }
- log(DEBUG,"Erasing module name vector...");
- for (std::vector<std::string>::iterator v = module_names.begin(); v != module_names.end(); v++)
- {
- if (*v == std::string(filename))
- {
- module_names.erase(v);
- break;
- }
- }
- log(DEBUG,"Erasing module pointer...");
- for (std::vector<Module*>::iterator m = modules.begin(); m!= modules.end(); m++)
- {
- if (*m == NULL)
- {
- modules.erase(m);
- break;
- }
- }