1
0
Fork 0
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:
Kostas Kyrimis 2024-10-24 12:45:11 +03:00 committed by GitHub
parent a4659c0843
commit 805f0203b9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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_);
}