summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-05-20 16:47:53 +0200
committerCarl Hetherington <cth@carlh.net>2021-05-20 16:47:53 +0200
commit93ae9e6e4319a792cbfe5302dddc1b7781c55c76 (patch)
treef6460a998ccf3937efe5b06b5dd1405150f57e5b
parent0baefb0594e5b3821b5770e3f4ef106aa7baba73 (diff)
Make sure workers are finished before the variables they use are torn down.
Might help with DoM #2006.
-rw-r--r--src/leqm_nrt.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/leqm_nrt.h b/src/leqm_nrt.h
index 189f0cf..2524ae9 100644
--- a/src/leqm_nrt.h
+++ b/src/leqm_nrt.h
@@ -168,6 +168,11 @@ public:
int num_cpu
);
+ ~Calculator()
+ {
+ _workers.clear();
+ }
+
Calculator(Calculator&) = delete;
Calculator(Calculator&&) = delete;
bool operator=(Calculator&) = delete;