From e6bb53c9f5ae4a9840d1d7153dcf6609dc3d1c12 Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Wed, 15 Jun 2011 09:08:13 -0400 Subject: [PATCH] Delete lister after it's done, before returning --- src/musicscanner.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/musicscanner.cpp b/src/musicscanner.cpp index 6b66f79cc..3123f5ca4 100644 --- a/src/musicscanner.cpp +++ b/src/musicscanner.cpp @@ -283,6 +283,16 @@ MusicScanner::listerFinished( const QMap& newmtimes ) connect( cmd, SIGNAL( finished() ), SIGNAL( finished() ) ); Database::instance()->enqueue( QSharedPointer(cmd) ); + + if ( !m_dirLister.isNull() ) + { + m_dirListerThreadController->quit();; + m_dirListerThreadController->wait( 60000 ); + + delete m_dirLister.data(); + delete m_dirListerThreadController; + m_dirListerThreadController = 0; + } }