replace new/delete with sp
This commit is contained in:
parent
e32731b60b
commit
ab5be0b773
71 changed files with 271 additions and 387 deletions
|
@ -40,7 +40,7 @@ class RxPrivate;
|
|||
|
||||
|
||||
static bool osInitialized = false;
|
||||
static RxPrivate *d_ptr = nullptr;
|
||||
static std::shared_ptr<RxPrivate> d_ptr;
|
||||
|
||||
|
||||
class RxPrivate
|
||||
|
@ -73,15 +73,13 @@ void xmrig::Rx::destroy()
|
|||
RxMsr::destroy();
|
||||
# endif
|
||||
|
||||
delete d_ptr;
|
||||
|
||||
d_ptr = nullptr;
|
||||
d_ptr.reset();
|
||||
}
|
||||
|
||||
|
||||
void xmrig::Rx::init(IRxListener *listener)
|
||||
{
|
||||
d_ptr = new RxPrivate(listener);
|
||||
d_ptr = std::make_shared<RxPrivate>(listener);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue