| 235 | |
| 236 | |
| 237 | MainWindow::~MainWindow() |
| 238 | { |
| 239 | for( PluginView *view : m_tools ) |
| 240 | { |
| 241 | delete view->model(); |
| 242 | delete view; |
| 243 | } |
| 244 | // TODO: Close tools |
| 245 | // dependencies are such that the editors must be destroyed BEFORE Song is deletect in Engine::destroy |
| 246 | // see issue #2015 on github |
| 247 | delete gui->automationEditor(); |
| 248 | delete gui->pianoRoll(); |
| 249 | delete gui->songEditor(); |
| 250 | // destroy engine which will do further cleanups etc. |
| 251 | Engine::destroy(); |
| 252 | } |
| 253 | |
| 254 | |
| 255 |