fix for 2 memory leaks in dualcon library, quite bad since they leaked on every evaluation.
This commit is contained in:
parent
35db9c5e70
commit
41721e11fb
@ -106,6 +106,7 @@ Octree::Octree(ModelReader *mr,
|
|||||||
|
|
||||||
Octree::~Octree()
|
Octree::~Octree()
|
||||||
{
|
{
|
||||||
|
delete cubes;
|
||||||
freeMemory();
|
freeMemory();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1910,11 +1911,13 @@ int Octree::floodFill(LeafNode *leaf, int st[3], int len, int height, int thresh
|
|||||||
maxtotal = total;
|
maxtotal = total;
|
||||||
}
|
}
|
||||||
dc_printf(".\n");
|
dc_printf(".\n");
|
||||||
|
delete queue;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (total >= threshold) {
|
if (total >= threshold) {
|
||||||
dc_printf("Maintained.\n");
|
dc_printf("Maintained.\n");
|
||||||
|
delete queue;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
dc_printf("Less then %d, removing...\n", threshold);
|
dc_printf("Less then %d, removing...\n", threshold);
|
||||||
@ -2001,6 +2004,8 @@ int Octree::floodFill(LeafNode *leaf, int st[3], int len, int height, int thresh
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
delete queue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user