mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
track memory correctly
This commit is contained in:
parent
43a86a0efe
commit
90da985ea0
2 changed files with 5 additions and 1 deletions
|
@ -440,6 +440,9 @@ private:
|
|||
void reallocate(u32 c, MapNode n)
|
||||
{
|
||||
delete[] data;
|
||||
if (c == 1)
|
||||
porting::TrackFreedMemory(sizeof(MapNode) * nodecount);
|
||||
|
||||
data = new MapNode[c];
|
||||
for (u32 i = 0; i < c; i++)
|
||||
data[i] = n;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue