| 156 | } |
| 157 | |
| 158 | void plugins_manager::clean_plugins(plugins_root *root) { |
| 159 | log_debug("p_root = %p", root); |
| 160 | if (root == NULL) return; |
| 161 | map<int, plugin_handler *>::iterator it = root->request_plugins.begin(); |
| 162 | for (; it != root->request_plugins.end(); it++) { |
| 163 | log_debug("request clean plugin %s", (it->second)->get_dll_name().c_str()); |
| 164 | (it->second)->get_instance()->clean(); |
| 165 | delete it->second; |
| 166 | root->response_plugins.erase(it->first); |
| 167 | } |
| 168 | for (it = root->response_plugins.begin(); |
| 169 | it != root->response_plugins.end(); it++) { |
| 170 | log_debug("response clean plugin %s", (it->second)->get_dll_name().c_str()); |
| 171 | (it->second)->get_instance()->clean(); |
| 172 | delete it->second; |
| 173 | } |
| 174 | delete root; |
| 175 | } |
| 176 | |
| 177 | plugins_manager::~plugins_manager() { |
| 178 | { |
nothing calls this directly
no test coverage detected