From c89274d3660394e5389116d3d61bd864b5c09698 Mon Sep 17 00:00:00 2001 From: Turo Lamminen Date: Sun, 8 Mar 2015 00:16:48 +0200 Subject: [PATCH] Free edges map before recursive calls to reduce memory consumption --- code/Subdivision.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/Subdivision.cpp b/code/Subdivision.cpp index 03200818c..4bc39c268 100644 --- a/code/Subdivision.cpp +++ b/code/Subdivision.cpp @@ -290,6 +290,8 @@ void CatmullClarkSubdivider::InternSubdivide ( } } + { + // we want edges to go away before the recursive calls so begin a new scope EdgeMap edges; // --------------------------------------------------------------------- @@ -572,6 +574,7 @@ void CatmullClarkSubdivider::InternSubdivide ( } } } + } // end of scope for edges, freeing its memory // --------------------------------------------------------------------- // 7. Apply the next subdivision step.