avoid memory leak in mesh widget
This commit is contained in:
parent
0a3691d6ac
commit
13a2516a6a
@ -359,7 +359,8 @@ cv::viz::MeshWidget::MeshWidget(const Mesh3d &mesh)
|
|||||||
|
|
||||||
vtkSmartPointer<vtkPoints> points = vtkSmartPointer<vtkPoints>::New ();
|
vtkSmartPointer<vtkPoints> points = vtkSmartPointer<vtkPoints>::New ();
|
||||||
vtkIdType nr_points = mesh.cloud.total();
|
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);
|
points->SetNumberOfPoints (nr_points);
|
||||||
|
|
||||||
// Copy data from cloud to vtkPoints
|
// Copy data from cloud to vtkPoints
|
||||||
|
Loading…
Reference in New Issue
Block a user