avoid memory leak in mesh widget

pull/1453/head
ozantonkal 11 years ago
parent 0a3691d6ac
commit 13a2516a6a
  1. 3
      modules/viz/src/cloud_widgets.cpp

@ -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

Loading…
Cancel
Save