2
0
Эх сурвалжийг харах

Merge pull request #480 from turol/subdiv-memory

Free edges map before recursive calls to reduce memory consumption
Kim Kulling 10 жил өмнө
parent
commit
727888ea10
1 өөрчлөгдсөн 3 нэмэгдсэн , 0 устгасан
  1. 3 0
      code/Subdivision.cpp

+ 3 - 0
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.