Skip to content

Commit 3b94273

Browse files
committed
Fix memory leaks in vtkOpenGLRenderer::DonePick()
The GetPixelData() and GetZbufferData() methods of vtkOpenGLRenderWindow return arrays allocated with operator new[]. In vtkOpenGLRenderer::DonePick(), ensure that the arrays returned by those methods are deleted.
1 parent c94d5bb commit 3b94273

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Rendering/OpenGL2/vtkOpenGLRenderer.cxx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,9 @@ void vtkOpenGLRenderer::DonePick()
719719
}
720720
}
721721

722+
delete [] pixBuffer;
723+
delete [] depthBuffer;
724+
722725
this->PickInfo->NumPicked = (unsigned int)this->PickInfo->PickValues.size();
723726

724727
this->PickInfo->PickedId = 0;

0 commit comments

Comments
 (0)