From: eap Date: Tue, 30 Jul 2013 13:06:46 +0000 (+0000) Subject: 0022261: EDF 2698 SMESH: Memory leak when displaying 2D quadratic elements as arcs X-Git-Tag: BR_hydro_v_0_3_1~96 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8c08401fcb9cbc9a775a6c2a9ebc3162746d3ee2;p=modules%2Fgui.git 0022261: EDF 2698 SMESH: Memory leak when displaying 2D quadratic elements as arcs (SIGSEGV on a sphere) Fix TransformGrid() + aTransformFilter->Update(); --- diff --git a/src/VTKViewer/VTKViewer_ArcBuilder.cxx b/src/VTKViewer/VTKViewer_ArcBuilder.cxx index dd87a91a3..af1ca4436 100644 --- a/src/VTKViewer/VTKViewer_ArcBuilder.cxx +++ b/src/VTKViewer/VTKViewer_ArcBuilder.cxx @@ -396,9 +396,11 @@ VTKViewer_ArcBuilder::TransformGrid(vtkUnstructuredGrid* theGrid, aTransform->RotateWXYZ(angle, theAxis.GetXYZ().X(), theAxis.GetXYZ().Y(), theAxis.GetXYZ().Z()); vtkTransformFilter* aTransformFilter = vtkTransformFilter::New(); aTransformFilter->SetTransform(aTransform); - aTransformFilter->SetInputData(theGrid); aTransform->Delete(); - return aTransformFilter->GetUnstructuredGridOutput(); + aTransformFilter->SetInputData(theGrid); + aTransformFilter->Update(); + vtkUnstructuredGrid * aGrid = aTransformFilter->GetUnstructuredGridOutput(); + return aGrid; }