fix for 2 memory leaks in dualcon library, quite bad since they leaked on every evaluation.
This commit is contained in:
@@ -106,6 +106,7 @@ Octree::Octree(ModelReader *mr,
|
||||
|
||||
Octree::~Octree()
|
||||
{
|
||||
delete cubes;
|
||||
freeMemory();
|
||||
}
|
||||
|
||||
@@ -1910,11 +1911,13 @@ int Octree::floodFill(LeafNode *leaf, int st[3], int len, int height, int thresh
|
||||
maxtotal = total;
|
||||
}
|
||||
dc_printf(".\n");
|
||||
delete queue;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (total >= threshold) {
|
||||
dc_printf("Maintained.\n");
|
||||
delete queue;
|
||||
continue;
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user