I do not have access to either system with a UI (I have only command line linux).<div>1.  Is there anyway to test it on Windows?</div><div>2.  Can you try running it and see if you get the same memory issues?<br><br><div class="gmail_quote">
On Tue, Apr 10, 2012 at 5:44 AM, Cory Quammen <span dir="ltr">&lt;<a href="mailto:cquammen@cs.unc.edu">cquammen@cs.unc.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The code you&#39;ve provided looks reasonable. If you wait a while, does<br>
the memory usage go down eventually?<br>
<br>
Do you have access to a Linux machine or a Mac? If so, valgrind should<br>
show you were the memory leak is coming from.<br>
<br>
Cory<br>
<div><div class="h5"><br>
On Tue, Apr 10, 2012 at 12:00 AM, Jonathan Morra &lt;<a href="mailto:jonmorra@gmail.com">jonmorra@gmail.com</a>&gt; wrote:<br>
&gt; I posted this a while ago and got no response.  Does anyone else see this<br>
&gt; problem?  Is there more information that I can provide?<br>
&gt;<br>
&gt;<br>
&gt; ---------- Forwarded message ----------<br>
&gt; From: Jonathan Morra &lt;<a href="mailto:jonmorra@gmail.com">jonmorra@gmail.com</a>&gt;<br>
&gt; Date: Tue, Mar 27, 2012 at 8:10 AM<br>
&gt; Subject: Memory leak<br>
&gt; To: VTK Mailing List &lt;<a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a>&gt;<br>
&gt;<br>
&gt;<br>
&gt; I posted this problem before, but got no response.  I&#39;ve slightly modified<br>
&gt; my test program to illustrate the problem more clearly.  Specifically, when<br>
&gt; I run the below code on Windows 7 compiled with MSVC 2008 in 32 bit with Qt<br>
&gt; 4.7.4 and VTK pulled from git master on March 5, 2012, I get a pretty<br>
&gt; pronounced memory leak.  As I mouse over the image, then memory in the<br>
&gt; Windows Task Manager climbs.  If I comment out the imageViewer-&gt;Render();<br>
&gt; line then the memory stays constants.<br>
&gt;<br>
&gt; Can someone please<br>
&gt; 1.  Verify that they see this on their machine as well<br>
&gt; 2.  Provide a way to fix it.<br>
&gt;<br>
&gt; Thanks<br>
&gt;<br>
&gt; #include &lt;QtGui/QApplication&gt;<br>
&gt;<br>
&gt; #include &lt;QMainWindow&gt;<br>
&gt;<br>
&gt; #include &lt;QVTKWidget2.h&gt;<br>
&gt;<br>
&gt; #include &lt;vtkImageViewer2.h&gt;<br>
&gt;<br>
&gt; #include &lt;vtkImageData.h&gt;<br>
&gt;<br>
&gt; #include &lt;vtkPointData.h&gt;<br>
&gt;<br>
&gt; #include &lt;vtkGenericOpenGLRenderWindow.h&gt;<br>
&gt;<br>
&gt; class MyQVTKWidget2 : public QVTKWidget2 {<br>
&gt;<br>
&gt; public:<br>
&gt;<br>
&gt;     MyQVTKWidget2 (vtkImageViewer2 *imageViewer, QWidget *parent = 0) :<br>
&gt; QVTKWidget2(parent) {<br>
&gt;<br>
&gt;         this-&gt;imageViewer = imageViewer;<br>
&gt;<br>
&gt;     }<br>
&gt;<br>
&gt;     virtual ~MyQVTKWidget2() {<br>
&gt;<br>
&gt;         imageViewer-&gt;Delete();<br>
&gt;<br>
&gt;     }<br>
&gt;<br>
&gt;     void mouseMoveEvent(QMouseEvent *) {<br>
&gt;<br>
&gt;         for (int i=0; i&lt;1000; ++i) {<br>
&gt;<br>
&gt;             // Comment out these lines to see the memory stay constant<br>
&gt;<br>
&gt;             imageViewer-&gt;Render();<br>
&gt;<br>
&gt;         }<br>
&gt;<br>
&gt;     }<br>
&gt;<br>
&gt; private:<br>
&gt;<br>
&gt;     vtkImageViewer2 *imageViewer;<br>
&gt;<br>
&gt; };<br>
&gt;<br>
&gt; int main(int argc, char *argv[]) {<br>
&gt;<br>
&gt;     QApplication a(argc, argv);<br>
&gt;<br>
&gt;     vtkImageData *imageData = vtkImageData::New();<br>
&gt;<br>
&gt;     imageData-&gt;SetExtent(0, 100, 0, 100, 0, 100);<br>
&gt;<br>
&gt;     imageData-&gt;SetOrigin(0, 0, 0);<br>
&gt;<br>
&gt;     imageData-&gt;SetSpacing(1, 1, 1);<br>
&gt;<br>
&gt;     imageData-&gt;AllocateScalars();<br>
&gt;<br>
&gt;     imageData-&gt;GetPointData()-&gt;GetScalars()-&gt;FillComponent(0, 0);<br>
&gt;<br>
&gt;     vtkImageViewer2 *imageViewer = vtkImageViewer2::New();<br>
&gt;<br>
&gt;     imageViewer-&gt;SetInput(imageData);<br>
&gt;<br>
&gt;     MyQVTKWidget2 *widget = new MyQVTKWidget2(imageViewer);<br>
&gt;<br>
&gt;     imageViewer-&gt;SetRenderWindow(widget-&gt;GetRenderWindow());<br>
&gt;<br>
&gt;     QMainWindow mainWindow;<br>
&gt;<br>
&gt;     mainWindow.setGeometry(200, 200, 300, 300);<br>
&gt;<br>
&gt;     mainWindow.setCentralWidget(widget);<br>
&gt;<br>
&gt;     mainWindow.show();<br>
&gt;<br>
&gt;     imageData-&gt;Delete();<br>
&gt;<br>
&gt;     return a.exec();<br>
&gt;<br>
&gt; }<br>
&gt;<br>
&gt;<br>
&gt; Here is the Qt .pro file as well if it helps<br>
&gt;<br>
&gt;<br>
&gt; #-------------------------------------------------<br>
&gt;<br>
&gt;<br>
&gt; #<br>
&gt;<br>
&gt; # Project created by QtCreator 2012-02-24T13:30:58<br>
&gt;<br>
&gt;<br>
&gt; #<br>
&gt;<br>
&gt; #-------------------------------------------------<br>
&gt;<br>
&gt; QT       += core opengl gui<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; TARGET = QVTKWidget2Test<br>
&gt;<br>
&gt; CONFIG   += console<br>
&gt;<br>
&gt; CONFIG   -= app_bundle<br>
&gt;<br>
&gt; TEMPLATE = app<br>
&gt;<br>
&gt;<br>
&gt; SOURCES += main.cpp<br>
&gt;<br>
&gt; LIBS    += -L../../vtk/lib -lvtkCommon -lvtksys -lQVTK\<br>
&gt;<br>
&gt;<br>
&gt;  -lvtkViews -lvtkWidgets -lvtkInfovis -lvtkRendering -lvtkGraphics<br>
&gt; -lvtkImaging -lvtkIO -lvtkFiltering\<br>
&gt;<br>
&gt;<br>
&gt;  -lvtklibxml2 -lvtkDICOMParser -lvtkpng -lvtkpng -lvtktiff -lvtkzlib<br>
&gt; -lvtkjpeg -lvtkalglib -lvtkexpat\<br>
&gt;<br>
&gt;<br>
&gt;  -lvtkverdict -lvtkmetaio -lvtkNetCDF -lvtksqlite -lvtkexoIIc -lvtkftgl<br>
&gt; -lvtkfreetype -lvtkHybrid\<br>
&gt;<br>
&gt;<br>
&gt;  -lvtkVolumeRendering<br>
&gt;<br>
&gt; INCLUDEPATH += ../vtk/include<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at<br>
&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the VTK FAQ at:<br>
&gt; <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
&gt;<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
--<br>
Cory Quammen<br>
Research Associate<br>
Department of Computer Science<br>
The University of North Carolina at Chapel Hill<br>
</font></span></blockquote></div><br></div>