<div dir="ltr">Where is your code that instantiates/deletes the surrounding C++ class?<div><br></div><div>Are you saying that instantiating one of those and then deleting it results in a VTK mem leak report?</div><div><br>
<br><div class="gmail_quote">On Thu, Aug 14, 2008 at 10:48 AM, Andi2008 <span dir="ltr">&lt;<a href="mailto:mail-andi@web.de">mail-andi@web.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
thank you for the quick answer.But my case is different. I fixed the leaks he<br>
reported already by loading all vtl dlls delayed. I am using MFC too. Visual<br>
Studio report leaks only if i create vtkObjects.vtkDebugLeaks and the fact<br>
that the private byte history in the ProcessExplorer doesnt decrease after i<br>
the objects tells me that the leaks come from vtk.<br>
<br>
I have no idea anymore what iam doing wrong.<br>
Andi<br>
<div><div></div><div class="Wj3C7c"><br>
<br>
<br>
malat wrote:<br>
&gt;<br>
&gt; Andreas,<br>
&gt;<br>
&gt; &nbsp; I you are using MFC, I suggest to read the following post:<br>
&gt;<br>
&gt; <a href="http://www.vtk.org/pipermail/vtkusers/2007-May/090968.html" target="_blank">http://www.vtk.org/pipermail/vtkusers/2007-May/090968.html</a><br>
&gt;<br>
&gt; &nbsp; The non-compiling example you posted looks fine to me.<br>
&gt;<br>
&gt; 2cts<br>
&gt; -Mathieu<br>
&gt;<br>
&gt; On Thu, Aug 14, 2008 at 2:41 PM, Andreas Brüning &lt;<a href="mailto:mail-andi@web.de">mail-andi@web.de</a>&gt; wrote:<br>
&gt;&gt; Hi,<br>
&gt;&gt;<br>
&gt;&gt; yes it is me again and i still have questions about deleting vtkobjects<br>
&gt;&gt; :)<br>
&gt;&gt; Regarding to my post from Aug/12:<br>
&gt;&gt;<br>
&gt;&gt; <a href="http://www.vtk.org/pipermail/vtkusers/2008-August/096455.html" target="_blank">http://www.vtk.org/pipermail/vtkusers/2008-August/096455.html</a><br>
&gt;&gt;<br>
&gt;&gt; i still have problems to delete vtkobjects in my program and it is not<br>
&gt;&gt; only the thread issue. To encapsulate the whole vtk stuff i created it in<br>
&gt;&gt; a single class. I created some vtk objects in the constructor and call<br>
&gt;&gt; the Delete() method in the destructor for testing. Than i created one of<br>
&gt;&gt; these class and delete &nbsp;it while i checked the private bytes history on<br>
&gt;&gt; Sysinternals ProcessExplorer(which is by the way a great tool). I also<br>
&gt;&gt; enabled VTK_DEGUG_LEAKS.<br>
&gt;&gt; I thought when i delete the class the whole vtk stuff is gone but it is<br>
&gt;&gt; not. i can see no memory reduction in the process explorer and the<br>
&gt;&gt; DebugLeaks MessageBox tells me that always the objects remains. When i<br>
&gt;&gt; create a vtkPolyDataMapper there are even more. If i create more of my<br>
&gt;&gt; vtkClasses there are no changes in the memory but the debugleaks<br>
&gt;&gt; MessageBox report that all the vtkObjects remain in memory.<br>
&gt;&gt;<br>
&gt;&gt; I really have no idea where is the mistake. I did the same procedure with<br>
&gt;&gt; the vtkExamples and there everything is fine and the memory always cleans<br>
&gt;&gt; up. I compared the project properies and they are the same.<br>
&gt;&gt;<br>
&gt;&gt; Here is the code of my very short vtkClass:<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; #include &quot;StdAfx.h&quot;<br>
&gt;&gt;<br>
&gt;&gt; #include &quot;ImageVolumeData.h&quot;<br>
&gt;&gt;<br>
&gt;&gt; #undef THIS_FILE<br>
&gt;&gt; static char BASED_CODE THIS_FILE[]=__FILE__;<br>
&gt;&gt;<br>
&gt;&gt; #define new DEBUG_NEW<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; ImageVolumeData::ImageVolumeData(void)<br>
&gt;&gt; {<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;vtk_importer = vtkImageImport::New(); &nbsp;//global Variables defined<br>
&gt;&gt; in the header<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;vtkflipper = vtkImageFlip::New();<br>
&gt;&gt;<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;//debugger = vtkDebugLeaks::New();<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;ren = vtkRenderer::New();<br>
&gt;&gt;<br>
&gt;&gt; }<br>
&gt;&gt;<br>
&gt;&gt; ImageVolumeData::~ImageVolumeData(void)<br>
&gt;&gt; {<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;vtk_importer-&gt;SetImportVoidPointer(NULL,0);<br>
&gt;&gt;<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;vtkflipper-&gt;Delete();<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;vtk_importer-&gt;Delete();<br>
&gt;&gt;<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;ren-&gt;Delete();<br>
&gt;&gt;<br>
&gt;&gt; }<br>
&gt;&gt;<br>
&gt;&gt; I hope someone can give me an advice, i am running out of ideas<br>
&gt;&gt;<br>
&gt;&gt; Thanks in advance<br>
&gt;&gt; Andi<br>
&gt;&gt; _____________________________________________________________________<br>
&gt;&gt; Der <a href="http://WEB.DE" target="_blank">WEB.DE</a> SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!<br>
&gt;&gt; <a href="http://smartsurfer.web.de/?mc=100071&amp;distributionid=000000000066" target="_blank">http://smartsurfer.web.de/?mc=100071&amp;distributionid=000000000066</a><br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; This is the private VTK discussion list.<br>
&gt;&gt; Please keep messages on-topic. Check the FAQ at:<br>
&gt;&gt; <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
&gt;&gt; Follow this link to subscribe/unsubscribe:<br>
&gt;&gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Mathieu<br>
&gt; _______________________________________________<br>
&gt; This is the private VTK discussion list.<br>
&gt; Please keep messages on-topic. Check the 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; 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>
&gt;<br>
<br>
</div></div><font color="#888888">--<br>
View this message in context: <a href="http://www.nabble.com/Delete-vtkObjects-tp18980765p18983087.html" target="_blank">http://www.nabble.com/Delete-vtkObjects-tp18980765p18983087.html</a><br>
Sent from the VTK - Users mailing list archive at Nabble.com.<br>
</font><div><div></div><div class="Wj3C7c"><br>
_______________________________________________<br>
This is the private VTK discussion list.<br>
Please keep messages on-topic. Check the FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</div></div></blockquote></div><br></div></div>