- do the clean-up in close()

- ensure deleted elements aren't accessed


git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@254 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Javier Serrano Polo
2006-07-22 03:27:19 +00:00
parent b468d04a98
commit a417c3b353
2 changed files with 18 additions and 1 deletions

View File

@@ -103,6 +103,8 @@ public:
return( m_automationEditor );
}
void close( void );
private:
bool m_hasGUI;

View File

@@ -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;
}