Remove most usages of "new" and "malloc" in the client

This commit is contained in:
Christian Flach 2020-02-11 23:29:32 +01:00 committed by Johannes Pohl
parent 689f550049
commit 8c8226f2dc
9 changed files with 24 additions and 31 deletions

View file

@ -84,7 +84,7 @@ void ClientConnection::start()
SLOG(NOTICE) << "Connected to " << socket_.remote_endpoint().address().to_string() << endl;
active_ = true;
sumTimeout_ = chronos::msec(0);
readerThread_ = new thread(&ClientConnection::reader, this);
readerThread_ = make_unique<thread>(&ClientConnection::reader, this);
}
@ -104,7 +104,6 @@ void ClientConnection::stop()
{
LOG(DEBUG) << "joining readerThread\n";
readerThread_->join();
delete readerThread_;
}
}
catch (...)