Commit 13a2516a authored by ozantonkal's avatar ozantonkal

avoid memory leak in mesh widget

parent 0a3691d6
......@@ -359,7 +359,8 @@ cv::viz::MeshWidget::MeshWidget(const Mesh3d &mesh)
vtkSmartPointer<vtkPoints> points = vtkSmartPointer<vtkPoints>::New ();
vtkIdType nr_points = mesh.cloud.total();
int * look_up = new int[nr_points];
Mat look_up_mat(1, nr_points, CV_32SC1);
int * look_up = look_up_mat.ptr<int>();
points->SetNumberOfPoints (nr_points);
// Copy data from cloud to vtkPoints
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment