Skip to content

Fix memory leak in VTKRenderer

Connor Bowley requested to merge connor.bowley/iMSTK:fix-memory-leak into master

vtkMatrix4x4* vtkCamera::GetProjectionTransformMatrix(vtkRenderer* ren) returns an owning pointer. By not deleting the pointer there was a memory leak caught by vtkDebugLeaks.

Note: vtkMatrix4x4* vtkCamera::GetProjectionTransformMatrix(double aspect, double nearz, double farz) returns a non-owning pointer and there is no mention of the difference in the VTK documentation.

I opened an issue in VTK requesting updated documentation on this (vtk/vtk#18386).

Merge request reports