diff --git a/include/engine.h b/include/engine.h index 79ee713e3..995797a0d 100644 --- a/include/engine.h +++ b/include/engine.h @@ -103,6 +103,8 @@ public: return( m_automationEditor ); } + void close( void ); + private: bool m_hasGUI; diff --git a/src/core/engine.cpp b/src/core/engine.cpp index 7bad7b7f6..dc1e2dd02 100644 --- a/src/core/engine.cpp +++ b/src/core/engine.cpp @@ -67,14 +67,26 @@ engine::engine( const bool _has_gui ) : engine::~engine() +{ +} + + + + +void engine::close( void ) { m_mixer->stopProcessing(); delete m_projectNotes; + m_projectNotes = NULL; delete m_songEditor; + m_songEditor = NULL; delete m_bbEditor; + m_bbEditor = NULL; delete m_pianoRoll; + m_pianoRoll = NULL; delete m_automationEditor; + m_automationEditor = NULL; presetPreviewPlayHandle::cleanUp( this ); @@ -83,8 +95,11 @@ engine::~engine() delete m_mixer; + m_mixer = NULL; //delete configManager::inst(); - + delete m_projectJournal; + m_projectJournal = NULL; + m_mainWindow = NULL; }