Skip to content

Commit

Permalink
Memory leak fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
intorr committed Dec 9, 2017
1 parent 3761287 commit 6f70821
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/xrCore/FixedMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ class FixedMAP
T val;
TNode *left, *right;

TNode() : key(), val(), left(nullptr), right(nullptr) {}

static void *operator new (size_t size) { return allocator::alloc(size); }
static void *operator new[](size_t size) { return allocator::alloc(size); }
static void operator delete (void *block) { allocator::dealloc(block); }
Expand Down Expand Up @@ -245,7 +247,7 @@ class FixedMAP
return N;
}
IC u32 allocated() { return this->limit; }
IC void clear() { pool = 0; }
IC void clear() { destroy(); }
IC TNode* begin() { return nodes; }
IC TNode* end() { return nodes + pool; }
IC TNode* last() { return nodes + limit; } // for setup only
Expand Down

0 comments on commit 6f70821

Please sign in to comment.