@@ -101,6 +101,11 @@ projectM::~projectM()
101101 _pcm = 0 ;
102102 }
103103
104+ if (timeKeeper) {
105+ delete timeKeeper;
106+ timeKeeper = NULL ;
107+ }
108+
104109 delete (_pipelineContext);
105110 delete (_pipelineContext2);
106111}
@@ -117,7 +122,8 @@ void projectM::projectM_resetTextures()
117122
118123
119124projectM::projectM ( std::string config_file, int flags) :
120- beatDetect ( 0 ), renderer ( 0 ), _pcm(0 ), m_presetPos(0 ), m_flags(flags), _pipelineContext(new PipelineContext()), _pipelineContext2(new PipelineContext())
125+ beatDetect ( 0 ), renderer ( 0 ), _pcm(0 ), m_presetPos(0 ), m_flags(flags), _pipelineContext(new PipelineContext()), _pipelineContext2(new PipelineContext()),
126+ timeKeeper(NULL ), _matcher(NULL ), _merger(NULL )
121127{
122128 readConfig (config_file);
123129 projectM_reset ();
@@ -126,7 +132,8 @@ beatDetect ( 0 ), renderer ( 0 ), _pcm(0), m_presetPos(0), m_flags(flags), _pip
126132}
127133
128134projectM::projectM (Settings settings, int flags):
129- beatDetect ( 0 ), renderer ( 0 ), _pcm(0 ), m_presetPos(0 ), m_flags(flags), _pipelineContext(new PipelineContext()), _pipelineContext2(new PipelineContext())
135+ beatDetect ( 0 ), renderer ( 0 ), _pcm(0 ), m_presetPos(0 ), m_flags(flags), _pipelineContext(new PipelineContext()), _pipelineContext2(new PipelineContext()),
136+ timeKeeper(NULL ), _matcher(NULL ), _merger(NULL )
130137{
131138 readSettings (settings);
132139 projectM_reset ();
@@ -652,6 +659,15 @@ static void *thread_callback(void *prjm) {
652659
653660 m_presetLoader = 0 ;
654661
662+ if (_matcher) {
663+ delete _matcher;
664+ _matcher = NULL ;
665+ }
666+
667+ if (_merger) {
668+ delete _merger;
669+ _merger = NULL ;
670+ }
655671 }
656672
657673 // / @bug queuePreset case isn't handled
0 commit comments