Fixed DnsUvBackend storage cleanup.
This commit is contained in:
parent
81e87a6931
commit
667f636c62
2 changed files with 24 additions and 14 deletions
|
@ -1,6 +1,6 @@
|
|||
/* XMRig
|
||||
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright 2016-2020 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
* Copyright 2018-2023 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright 2016-2023 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -42,7 +42,7 @@ public:
|
|||
}
|
||||
|
||||
|
||||
inline void *ptr(uintptr_t id) { return reinterpret_cast<void *>(id); }
|
||||
inline TYPE *ptr(uintptr_t id) { return reinterpret_cast<TYPE *>(id); }
|
||||
|
||||
|
||||
inline TYPE *get(const void *id) const { return get(reinterpret_cast<uintptr_t>(id)); }
|
||||
|
@ -56,6 +56,9 @@ public:
|
|||
return m_data.at(id);
|
||||
}
|
||||
|
||||
inline bool isEmpty() const { return m_data.empty(); }
|
||||
inline size_t size() const { return m_data.size(); }
|
||||
|
||||
|
||||
inline void remove(const void *id) { delete release(reinterpret_cast<uintptr_t>(id)); }
|
||||
inline void remove(uintptr_t id) { delete release(id); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue