diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-08-04 22:05:29 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-08-04 22:05:29 +0400 |
commit | 41721e11fbf73812297b6945d0d6683eda400ba0 (patch) | |
tree | 41e3245edb6f8b1628a8129b01f86584f4d0f09e /intern/dualcon | |
parent | 35db9c5e70340a6325b33403538b18d78e4d6867 (diff) |
fix for 2 memory leaks in dualcon library, quite bad since they leaked on every evaluation.
Diffstat (limited to 'intern/dualcon')
-rw-r--r-- | intern/dualcon/intern/octree.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/intern/dualcon/intern/octree.cpp b/intern/dualcon/intern/octree.cpp index 6567b2873a2..3ba396b940d 100644 --- a/intern/dualcon/intern/octree.cpp +++ b/intern/dualcon/intern/octree.cpp @@ -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; } } |