summaryrefslogtreecommitdiffstats
path: root/src/server/Worker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/Worker.cpp')
-rw-r--r--src/server/Worker.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/server/Worker.cpp b/src/server/Worker.cpp
index 368455e2..65ce7727 100644
--- a/src/server/Worker.cpp
+++ b/src/server/Worker.cpp
@@ -118,7 +118,7 @@ Worker::Worker(Log& log, uint32_t buffer_size, bool synchronous)
, _synchronous(synchronous)
{
if (!synchronous) {
- _thread = new std::thread(&Worker::run, this);
+ _thread = make_unique<std::thread>(&Worker::run, this);
}
}
@@ -128,7 +128,6 @@ Worker::~Worker()
_sem.post();
if (_thread) {
_thread->join();
- delete _thread;
}
free(_buffer);
}