Skip to content
This repository has been archived by the owner on Feb 16, 2020. It is now read-only.

Commit

Permalink
Cleanup messages/maildirs on teardown.
Browse files Browse the repository at this point in the history
This updates #287.
  • Loading branch information
skx committed Apr 9, 2017
1 parent 44a1672 commit 93b0210
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/global_state.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,18 @@ CGlobalState::CGlobalState() : Observer(CConfig::instance())
*/
CGlobalState::~CGlobalState()
{
/*
* If we have items already then free each of them.
*/
if (m_messages != NULL)
delete(m_messages);

/*
* If we have items already then remove them.
*/
if (!m_maildirs.empty())
m_maildirs.clear();

}


Expand Down

0 comments on commit 93b0210

Please sign in to comment.