Locked History Attachments

ChangeRequests/1432

vtk memory leaks in MITK

Actual behavior

There are some memory leaks of VTK in MITK.

Axpected behavior

There are NO memory leaks of VTK in MITK.

Cause of the bug

Wrong initialization of vtk variables or vtk objects were not deleted correctly (e.g. by still holding a smart pointer to this object).

Proposed solution

Compile VTK with VTK_DEBUG_LEAKS set to on. First, start with small pieces of code (tutorial step 1 to 8). Run Application and look at the vtk error messages on the console after exiting it. Afterwards go on with: Start ExtApp and close it again; start Extapp, load image and close it.

Affected classes

mitk\Application\Tutorial\Step7.cpp

mitk\Core\Code\Controllers\mitkRenderingManager.cpp

mitk\Core\Code\Rendering\mitkGeometry2DDataMapper2D.h

mitk\Core\Code\Rendering\mitkGeometry2DDataVtkMapper3D.h

mitk\Core\Code\Rendering\mitkSurfaceMapper2D.cpp

mitk\Core\Code\Testing\mitkFocusManagerTest.cpp

mitk\CoreUI\Qmitk\QmitkStdMultiWidget.h

mitk\CoreUI\Qmitk\QmitkStdMultiWidget.cpp

mitk\Modules\Bundles\org.mitk.gui.qt.datamanager\src\QmitkDataManagerView.cpp

How will the bugfix get tested?

As described in proposed solution: compile VTK with VTK_DEBUG_LEAKS set to on and run/close Application.