projectM::~projectM() { #ifdef USE_THREADS printf("c"); running = false; printf("l"); pthread_cond_signal(&condition); printf("e"); pthread_mutex_unlock( &mutex ); printf("a"); pthread_detach(thread); printf("n"); pthread_cond_destroy(&condition); printf("u"); pthread_mutex_destroy( &mutex ); printf("p"); #endif destroyPresetTools(); if ( renderer ) delete ( renderer ); if ( beatDetect ) delete ( beatDetect ); if ( _pcm ) { delete ( _pcm ); _pcm = 0; } }
projectM::~projectM() { #ifdef USE_THREADS void *status; std::cout << "[projectM] thread "; printf("cl"); worker_sync.finish_up(); printf("e"); pthread_join(thread, &status); printf("n"); #ifdef SYNC_PRESET_SWITCHES pthread_mutex_destroy( &preset_mutex ); #endif printf("up"); std::cout << std::endl; #endif destroyPresetTools(); if ( renderer ) delete ( renderer ); if ( beatDetect ) delete ( beatDetect ); if ( _pcm ) { delete ( _pcm ); _pcm = 0; } if(timeKeeper) { delete timeKeeper; timeKeeper = NULL; } delete(_pipelineContext); delete(_pipelineContext2); }
projectM::~projectM() { #ifdef USE_THREADS std::cout << "[projectM] thread "; printf("c"); running = false; printf("l"); pthread_cond_signal(&condition); printf("e"); pthread_mutex_unlock( &mutex ); printf("a"); pthread_detach(thread); printf("n"); pthread_cond_destroy(&condition); printf("u"); pthread_mutex_destroy( &mutex ); #ifdef SYNC_PRESET_SWITCHES pthread_mutex_destroy( &preset_mutex ); #endif printf("p"); std::cout << std::endl; #endif destroyPresetTools(); if ( renderer ) delete ( renderer ); if ( beatDetect ) delete ( beatDetect ); if ( _pcm ) { delete ( _pcm ); _pcm = 0; } delete(_pipelineContext); delete(_pipelineContext2); }