1
0
mirror of https://github.com/xmrig/xmrig.git synced 2025-12-25 13:42:54 -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

@@ -50,7 +50,7 @@ public:
RxDataset(RxCache *cache);
~RxDataset();
inline randomx_dataset *get() const { return m_dataset; }
inline randomx_dataset *get() const { return m_dataset.get(); }
inline RxCache *cache() const { return m_cache; }
inline void setCache(RxCache *cache) { m_cache = cache; }
@@ -70,11 +70,11 @@ private:
const RxConfig::Mode m_mode = RxConfig::FastMode;
const uint32_t m_node;
randomx_dataset *m_dataset = nullptr;
std::shared_ptr<randomx_dataset> m_dataset;
RxCache *m_cache = nullptr;
size_t m_scratchpadLimit = 0;
std::atomic<size_t> m_scratchpadOffset{};
VirtualMemory *m_memory = nullptr;
std::shared_ptr<VirtualMemory> m_memory;
};