Skip to content

Commit 6f70821

Browse files
committed
Memory leak fixes.
1 parent 3761287 commit 6f70821

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/xrCore/FixedMap.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ class FixedMAP
1717
T val;
1818
TNode *left, *right;
1919

20+
TNode() : key(), val(), left(nullptr), right(nullptr) {}
21+
2022
static void *operator new (size_t size) { return allocator::alloc(size); }
2123
static void *operator new[](size_t size) { return allocator::alloc(size); }
2224
static void operator delete (void *block) { allocator::dealloc(block); }
@@ -245,7 +247,7 @@ class FixedMAP
245247
return N;
246248
}
247249
IC u32 allocated() { return this->limit; }
248-
IC void clear() { pool = 0; }
250+
IC void clear() { destroy(); }
249251
IC TNode* begin() { return nodes; }
250252
IC TNode* end() { return nodes + pool; }
251253
IC TNode* last() { return nodes + limit; } // for setup only

0 commit comments

Comments
 (0)