Commit 9d909a89 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Solved memory leak: destroying worker threads and instance

parent b6e8d038
......@@ -20,6 +20,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include <QtDebug>
#include "MetaDataManager.h"
#include "MetaDataWorker.h"
#include "Library.h"
......@@ -39,5 +40,5 @@ void MetaDataManager::newMediaLoaded( Media* media )
{
MetaDataWorker* w = new MetaDataWorker( media );
w->setRenderWidget( m_renderWidget );
w->run();
w->start();
}
......@@ -38,8 +38,6 @@ MetaDataWorker::~MetaDataWorker()
{
if (m_mediaPlayer)
delete m_mediaPlayer;
if (m_renderWidget)
delete m_renderWidget;
}
void MetaDataWorker::setRenderWidget( QWidget* widget )
......@@ -134,6 +132,7 @@ void MetaDataWorker::setSnapshot()
m_mediaPlayer->stop();
//startAudioDataParsing();
delete this;
}
void MetaDataWorker::startAudioDataParsing()
......@@ -215,4 +214,3 @@ void MetaDataWorker::entrypointPlaying()
if ( m_lengthHasChanged == true )
getMetaData();
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment