fix for 2 memory leaks in dualcon library, quite bad since they leaked on every evaluation.

This commit is contained in:
Campbell Barton 2013-08-04 18:05:29 +00:00
parent 35db9c5e70
commit 41721e11fb

View File

@ -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;
}
}