replace new/delete with sp
This commit is contained in:
parent
e32731b60b
commit
ab5be0b773
71 changed files with 271 additions and 387 deletions
|
@ -87,14 +87,13 @@ xmrig::DaemonClient::DaemonClient(int id, IClientListener *listener) :
|
|||
BaseClient(id, listener)
|
||||
{
|
||||
m_httpListener = std::make_shared<HttpListener>(this);
|
||||
m_timer = new Timer(this);
|
||||
m_timer = std::make_shared<Timer>(this);
|
||||
m_key = m_storage.add(this);
|
||||
}
|
||||
|
||||
|
||||
xmrig::DaemonClient::~DaemonClient()
|
||||
{
|
||||
delete m_timer;
|
||||
delete m_ZMQSocket;
|
||||
}
|
||||
|
||||
|
@ -104,9 +103,6 @@ void xmrig::DaemonClient::deleteLater()
|
|||
if (m_pool.zmq_port() >= 0) {
|
||||
ZMQClose(true);
|
||||
}
|
||||
else {
|
||||
delete this;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue