Commit af4c9d05 authored by saubatn's avatar saubatn

FIXED : BUG 158. Old user transform for updating axes was never deleted,...

FIXED : BUG 158. Old user transform for updating axes was never deleted, causing a memory leak on each call to any viewer refresh method.

git-svn-id: svn+ssh://scm.forge.imag.fr/var/lib/gforge/chroot/scmrepos/svn/camitk/trunk/camitk@727 ec899d31-69d1-42ba-9299-647d76f65fb3
parent 1c939748
......@@ -682,7 +682,12 @@ void RendererWidget::updateAxes() {
vtkSmartPointer<vtkTransform> transform = vtkTransform::New();
transform->Identity();
transform->Scale(maxLength, maxLength, maxLength);
// free the last user transform used. Not freeing it, caused a memory leak on each viewer->refresh() call
annotatedCube->GetAssembly()->GetUserTransform()->Delete();
annotatedCube->GetAssembly()->SetUserTransform(transform);
}
// ----------------------- setColorScale -----------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment