mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2024-12-14 11:58:02 +00:00
fix(memory-leak): add missing destructor to RaxTreeMap (#3975)
The destructor of RaxTreeMap was missing causing memory leak. Signed-off-by: kostas <kostas@dragonflydb.io>
This commit is contained in:
parent
a4659c0843
commit
805f0203b9
1 changed files with 4 additions and 0 deletions
|
@ -91,6 +91,10 @@ template <typename V> struct RaxTreeMap {
|
|||
explicit RaxTreeMap(PMR_NS::memory_resource* mr) : tree_(raxNew()), alloc_(mr) {
|
||||
}
|
||||
|
||||
~RaxTreeMap() {
|
||||
raxFree(tree_);
|
||||
}
|
||||
|
||||
size_t size() const {
|
||||
return raxSize(tree_);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue