From 0dc1e10bd38b1d5fdc437fa7a84477f5b30be48a Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Mon, 30 Jul 2018 18:51:18 +0200 Subject: [PATCH] slsDetectorSoftware: order of zmq deletion in multi destructor to first because api using zmq to get data will need to be deleted first --- .../multiSlsDetector/multiSlsDetector.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp index 61bca239c..697e1b0b6 100644 --- a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp +++ b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp @@ -42,6 +42,11 @@ multiSlsDetector::multiSlsDetector(int id, bool verify, bool update) multiSlsDetector::~multiSlsDetector() { + for (vector::const_iterator it = zmqSocket.begin(); it != zmqSocket.end(); ++it) { + delete(*it); + } + zmqSocket.clear(); + for (vector::const_iterator it = detectors.begin(); it != detectors.end(); ++it) { delete(*it); } @@ -52,11 +57,6 @@ multiSlsDetector::~multiSlsDetector() { delete sharedMemory; } - for (vector::const_iterator it = zmqSocket.begin(); it != zmqSocket.end(); ++it) { - delete(*it); - } - zmqSocket.clear(); - destroyThreadPool(); }