<div dir="ltr"><div dir="ltr"><div dir="ltr">Hi Ran,<div><br></div><div>It's good to see people using vtkDICOMReader instead of the old vtkDICOMImageReader!</div><div><br></div><div>My guess is that vtkGenericOpenGLRenderWindow isn't being deleted, and it is holding references (directly or indirectly) to all of the other objects that are leaking.  And, of course, the QVTKOpenGLWidget holds the reference to the vtkGenericOpenGLRenderWindow.</div><div><br></div><div>So either QVTKOpenGLWidget isn't being destroyed, or you are keeping an extra reference to vtkGenericOpenGLRenderWindow in addition to the reference kept by QVTKOpenGLWidget.  Once you fix the vtkGenericOpenGLRenderWindow leak, then all the other leaks should vanish.</div><div><br></div><div>  David</div></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Dec 4, 2018 at 7:28 AM ran <<a href="mailto:kor1581@gmail.com">kor1581@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'm using vtk 8.1.0 for displaying DICOM images in three windows in Qt widget<br>
application in windows 10. <br>
For this mainly uses uses three instances vtkResliceImageViewer,<br>
vtkGenericOpenGLRenderWindow, vtkDICOMReader, vtkDICOMMetaData,<br>
vtkInteractorStyleImage<br>
also uses QVTKOpenGLWidget for fitting the images in Qt window. <br>
I'm using smart pointers for all the objects, for vtk uses vtkSmartPointer,<br>
Qt uses QPointer.<br>
While the application window closes occurring a long list of vtkDebugLeaks. <br>
Also, the application crashes while opening the second time.<br>
Is these vtkDebugLeaks affect the application working? or can ignore<br>
The list shows a long list which also includes classes not using and can't<br>
find main classes of causing the leaks.<br>
Even though uses smart pointers, why these leaks happen.<br>
<br>
Below shows the list of leaks, <br>
<br>
/vtkDebugLeaks has detected LEAKS!<br>
Class "vtkOpenGLRenderTimerLog" has 3 instances still around.<br>
Class "vtkOpenGLTextActor" has 6 instances still around.<br>
Class "vtkSynchronizedTemplatesCutter3D" has 3 instances still around.<br>
Class "vtk3DWidgetConnection" has 3 instances still around.<br>
Class "vtkOpenGLTextMapper" has 3 instances still around.<br>
Class "vtkTextureObject" has 6 instances still around.<br>
Class "vtkCellData" has 78 instances still around.<br>
Class "vtkResliceImageViewerMeasurements" has 3 instances still around.<br>
Class "vtkTransformPolyDataFilter" has 3 instances still around.<br>
Class "vtkCollection" has 9 instances still around.<br>
Class "vtkFrustumCoverageCuller" has 3 instances still around.<br>
Class "vtkInformationIntegerVectorValue" has 45 instances still around.<br>
Class "vtkInformationVector" has 861 instances still around.<br>
Class "vtkPerspectiveTransform" has 6 instances still around.<br>
Class "vtkResliceCursorPicker" has 3 instances still around.<br>
Class "vtkPlaneCollection" has 3 instances still around.<br>
Class "vtkResliceCursorActor" has 3 instances still around.<br>
Class "vtkPointData" has 78 instances still around.<br>
Class "vtkImageActor" has 6 instances still around.<br>
Class "vtkWidgetEventTranslator" has 6 instances still around.<br>
Class "class vtkBuffer<unsigned short>" has 3 instances still around.<br>
Class "vtkProperty2D" has 6 instances still around.<br>
Class "vtkCompositeDataPipeline" has 153 instances still around.<br>
Class "vtkMatrix3x3" has 144 instances still around.<br>
Class "vtkProp3DCollection" has 9 instances still around.<br>
Class "vtkTrivialProducer" has 45 instances still around.<br>
Class "vtkOpenGLIndexBufferObject" has 552 instances still around.<br>
Class "vtkMatrix4x4" has 669 instances still around.<br>
Class "vtkUnsignedShortArray" has 3 instances still around.<br>
Class "class vtkBuffer<__int64>" has 54 instances still around.<br>
Class "vtkPickingManager" has 3 instances still around.<br>
Class "QVTKInteractor" has 3 instances still around.<br>
Class "vtkCoordinate" has 30 instances still around.<br>
Class "vtkImageMapToColors" has 3 instances still around.<br>
Class "vtkBox" has 3 instances still around.<br>
Class "vtkPlane" has 18 instances still around.<br>
Class "vtkSimpleTransform" has 27 instances still around.<br>
Class "class vtkBuffer<unsigned char>" has 15 instances still around.<br>
Class "vtkPlaneSource" has 6 instances still around.<br>
Class "vtkPoints" has 105 instances still around.<br>
Class "vtkIntArray" has 6 instances still around.<br>
Class "vtkInformation" has 1902 instances still around.<br>
Class "vtkImageReslice" has 3 instances still around.<br>
Class "vtkActorCollection" has 12 instances still around.<br>
Class "vtkLine" has 12 instances still around.<br>
Class "vtkInformationStringVectorValue" has 6 instances still around.<br>
Class "vtkBoundedPlanePointPlacer" has 3 instances still around.<br>
Class "vtkGenericOpenGLRenderWindow" has 3 instances still around.<br>
Class "vtkMultiThreader" has 15 instances still around.<br>
Class "vtkVolumeCollection" has 3 instances still around.<br>
Class "vtkAssemblyPath" has 3 instances still around.<br>
Class "vtkPropCollection" has 27 instances still around.<br>
Class "vtkResliceCursorLineRepresentation" has 3 instances still around.<br>
Class "vtkAssemblyNode" has 3 instances still around.<br>
Class "vtkInformationIntegerPointerValue" has 24 instances still around.<br>
Class "vtkSynchronizedTemplates3D" has 3 instances still around.<br>
Class "vtkGenericCell" has 9 instances still around.<br>
Class "vtkDICOMMetaData" has 3 instances still around.<br>
Class "vtkPolyData" has 57 instances still around.<br>
Class "vtkLookupTable" has 6 instances still around.<br>
Class "vtkPixel" has 12 instances still around.<br>
Class "class vtkBuffer<int>" has 6 instances still around.<br>
Class "vtkPropPicker" has 6 instances still around.<br>
Class "imriLocalizerVtkInteractionStyleImage" has 3 instances still around.<br>
Class "vtkActor2D" has 6 instances still around.<br>
Class "vtkOpenGLCamera" has 3 instances still around.<br>
Class "vtkPlaneWidget" has 3 instances still around.<br>
Class "vtkOpenGLVertexArrayObject" has 552 instances still around.<br>
Class "vtkOpenGLActor" has 69 instances still around.<br>
Class "vtkResliceCursorWidget" has 3 instances still around.<br>
Class "vtkOpenGLPolyDataMapper" has 72 instances still around.<br>
Class "vtkIdList" has 48 instances still around.<br>
Class "vtkWorldPointPicker" has 6 instances still around.<br>
Class "vtkEmptyCell" has 9 instances still around.<br>
Class "vtkRectilinearSynchronizedTemplates" has 3 instances still around.<br>
Class "vtkObserverMediator" has 3 instances still around.<br>
Class "vtkConeSource" has 6 instances still around.<br>
Class "vtkDoubleArray" has 66 instances still around.<br>
Class "vtkInteractorStyleImage" has 3 instances still around.<br>
Class "vtkMatrixToLinearTransform" has 9 instances still around.<br>
Class "vtkAlgorithmOutput" has 93 instances still around.<br>
Class "vtkCullerCollection" has 3 instances still around.<br>
Class "vtkOpenGLRenderer" has 3 instances still around.<br>
Class "vtkImageStencilData" has 3 instances still around.<br>
Class "vtkInformationIntegerValue" has 1743 instances still around.<br>
Class "vtkImageProperty" has 6 instances still around.<br>
Class "vtkTextProperty" has 15 instances still around.<br>
Class "vtkOpenGLPolyDataMapper2D" has 12 instances still around.<br>
Class "vtkGridSynchronizedTemplates3D" has 3 instances still around.<br>
Class "vtkOpenGLLight" has 3 instances still around.<br>
Class "vtkTextRepresentation" has 3 instances still around.<br>
Class "vtkCellArray" has 54 instances still around.<br>
Class "vtkRendererCollection" has 3 instances still around.<br>
Class "vtkClipPolyData" has 3 instances still around.<br>
Class "vtkShaderProgram" has 9 instances still around.<br>
Class "class vtkBuffer<float>" has 81 instances still around.<br>
Class "vtkResliceCursor" has 3 instances still around.<br>
Class "vtkCutter" has 3 instances still around.<br>
Class "vtkOpenGLShaderCache" has 3 instances still around.<br>
Class "vtkTDxInteractorStyleCamera" has 6 instances still around.<br>
Class "vtkImageData" has 21 instances still around.<br>
Class "vtkFloatArray" has 81 instances still around.<br>
Class "vtkInformationStringValue" has 24 instances still around.<br>
Class "vtkInformationExecutivePortVectorValue" has 93 instances still<br>
around.<br>
Class "vtkImageMapToWindowLevelColors" has 3 instances still around.<br>
Class "vtkContourValues" has 15 instances still around.<br>
Class "vtkIdTypeArray" has 54 instances still around.<br>
Class "vtkTransform" has 276 instances still around.<br>
Class "vtkLinearExtrusionFilter" has 6 instances still around.<br>
Class "vtkOutlineSource" has 6 instances still around.<br>
Class "vtkOpenGLVertexBufferObjectGroup" has 84 instances still around.<br>
Class "vtkFieldData" has 84 instances still around.<br>
Class "vtkTextWidget" has 3 instances still around.<br>
Class "vtkOpenGLProperty" has 33 instances still around.<br>
Class "class vtkBuffer<double>" has 66 instances still around.<br>
Class "vtkScalarsToColors" has 6 instances still around.<br>
Class "vtkOpenGLTexture" has 18 instances still around.<br>
Class "vtkInformationDoubleVectorValue" has 45 instances still around.<br>
Class "vtkLineSource" has 6 instances still around.<br>
Class "vtkLightCollection" has 3 instances still around.<br>
Class "vtkEvent" has 42 instances still around.<br>
Class "vtkWidgetCallbackMapper" has 6 instances still around.<br>
Class "vtkUnsignedCharArray" has 15 instances still around.<br>
Class "vtkSphereSource" has 12 instances still around.<br>
Class "vtkShader" has 27 instances still around.<br>
Class "vtkTDxInteractorStyleSettings" has 6 instances still around.<br>
Class "vtkCellPicker" has 6 instances still around.<br>
Class "vtkStreamingDemandDrivenPipeline" has 45 instances still around.<br>
Class "vtkResliceCursorPolyDataAlgorithm" has 3 instances still around.<br>
Class "vtkTextureUnitManager" has 3 instances still around.<br>
Class "vtkOpenGLVertexBufferObjectCache" has 3 instances still around.<br>
Class "vtkActor2DCollection" has 3 instances still around.<br>
Class "vtkAssemblyPaths" has 3 instances still around.<br>
Class "vtkTimerLog" has 93 instances still around.<br>
Class "vtkResliceImageViewer" has 3 instances still around.<br>
Class "vtkCommand or subclass" has 135 instances still around.<br>
Class "vtkOpenGLImageSliceMapper" has 6 instances still around.<br>
Class "vtkInformationExecutivePortValue" has 126 instances still around.<br>
Class "vtkFXAAOptions" has 3 instances still around.<br>
/<br>
<br>
<br>
<br>
--<br>
Sent from: <a href="http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html" rel="noreferrer" target="_blank">http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html</a><br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">https://public.kitware.com/mailman/listinfo/vtkusers</a><br>
</blockquote></div>