| 286 | } |
| 287 | |
| 288 | void ModuleGraph::DestroyModule(Module *m, bool erase) { |
| 289 | changes_made_ = true; |
| 290 | |
| 291 | m->Destroy(); |
| 292 | |
| 293 | if (erase) { |
| 294 | all_modules_.erase(m->name()); |
| 295 | } |
| 296 | |
| 297 | if (m->is_task()) { |
| 298 | tasks_.erase(m->name()); |
| 299 | } |
| 300 | |
| 301 | delete m; |
| 302 | } |
| 303 | |
| 304 | void ModuleGraph::DestroyAllModules() { |
| 305 | changes_made_ = true; |