From 0f2b7fbc451a34c9eba34616e726985b7a0d14b1 Mon Sep 17 00:00:00 2001 From: Anatoly Baksheev Date: Sat, 18 Oct 2014 18:12:36 +0400 Subject: [PATCH] viz: fixed memory leak, issue 3961 --- modules/viz/src/vtk/vtkImageMatSource.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/viz/src/vtk/vtkImageMatSource.cpp b/modules/viz/src/vtk/vtkImageMatSource.cpp index 58a5642d4..658617523 100644 --- a/modules/viz/src/vtk/vtkImageMatSource.cpp +++ b/modules/viz/src/vtk/vtkImageMatSource.cpp @@ -52,7 +52,7 @@ namespace cv { namespace viz cv::viz::vtkImageMatSource::vtkImageMatSource() { this->SetNumberOfInputPorts(0); - this->ImageData = vtkImageData::New(); + this->ImageData = vtkSmartPointer::New(); } int cv::viz::vtkImageMatSource::RequestInformation(vtkInformation *, vtkInformationVector**, vtkInformationVector *outputVector)