removed leak from postprocessing, moved delete task to earlier in threadpool and deleting threadpool

This commit is contained in:
Dhanya Maliakal
2017-05-12 10:32:16 +02:00
parent 0e9cf558b4
commit 15424149cd
3 changed files with 15 additions and 3 deletions

View File

@ -293,7 +293,6 @@ multiSlsDetector::~multiSlsDetector() {
int multiSlsDetector::createThreadPool(){
if(threadpool){
threadpool->destroy_threadpool();
threadpool=0;
}
if(thisMultiDetector->numberOfDetectors < 1){
cout << "No detectors attached to create threadpool" << endl;
@ -321,6 +320,7 @@ int multiSlsDetector::createThreadPool(){
void multiSlsDetector::destroyThreadPool(){
if(threadpool){
threadpool->destroy_threadpool();
delete threadpool;
threadpool=0;
#ifdef VERBOSE
cout<<"Destroyed Threadpool "<< threadpool << endl;