fix for carve memory leak, update carve to hg bf36d92ff093
[blender.git] / extern / carve / include / carve / polyline_decl.hpp
index a29c56656ff65b69a7b561419bf7dcb797c5354c..5934dd25a34641f72262cffefe4e09ab08ff4fad 100644 (file)
@@ -138,6 +138,11 @@ namespace carve {
       PolylineSet(const std::vector<carve::geom3d::Vector> &points);
       PolylineSet() {
       }
+      ~PolylineSet() {
+        for (line_iter i = lines.begin(); i != lines.end(); ++i) {
+          delete *i;
+        }
+      }
 
       template<typename iter_t>
       void addPolyline(bool closed, iter_t begin, iter_t end);