1
0
mirror of https://github.com/xmrig/xmrig.git synced 2025-12-10 17:12:46 -05:00

replace new/delete with sp

This commit is contained in:
4ertus2
2024-10-20 08:24:09 +03:00
parent e32731b60b
commit ab5be0b773
71 changed files with 271 additions and 387 deletions

View File

@@ -66,7 +66,7 @@ protected:
void hashrateData(uint64_t &hashCount, uint64_t &timeStamp, uint64_t &rawHashes) const override;
void start() override;
inline const VirtualMemory *memory() const override { return m_memory; }
inline const VirtualMemory* memory() const override { return m_memory.get(); }
inline size_t intensity() const override { return N; }
inline void jobEarlyNotification(const Job&) override {}
@@ -92,11 +92,11 @@ private:
const Miner *m_miner;
const size_t m_threads;
cryptonight_ctx *m_ctx[N];
VirtualMemory *m_memory = nullptr;
std::shared_ptr<VirtualMemory> m_memory;
WorkerJob<N> m_job;
# ifdef XMRIG_ALGO_RANDOMX
randomx_vm *m_vm = nullptr;
std::shared_ptr<randomx_vm> m_vm;
Buffer m_seed;
# endif