<span class="gmail_quote"><br></span>I believe destroying the AppendFilter will resulting in deleting the Output Dataset as well.&nbsp; to get around this, you can try something like this:<br><br><div style="margin-left: 40px;">
merger-&gt;update();<br>vtkUnstructuredGrid *result = vtkUnstructuredGrid::New();
<br>result-&gt;DeepCopy(merger-&gt;GetOutput());<br><br>merger-&gt;Delete();<br>return result;<br></div><div><span class="e" id="q_10fca1213caa8e04_1"><br><br><div><span class="gmail_quote">On 12/28/06, <b class="gmail_sendername">
Burlen</b> &lt;<a href="mailto:burlen@apollo.sr.unh.edu" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
burlen@apollo.sr.unh.edu</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br><br>I have a situation where I&#39;m processing chunks of a data set and using the
<br>append filter to combine the result into another dataset. The chunks are<br>passed into a subroutine where the processing and appending takes place. the<br>append filter is new&#39;d in the subtroutine, however if I delete the append
<br>filter then I get a segfault during any later opperations on the resulting<br>dataset.<br><br>it&#39;s some thing like this:<br><br>vtkUnstructuredGrid *processData( vector&lt;vtkUnstructuredGrid *&gt; &amp;chunks )<br>

{<br>&nbsp;&nbsp; vtkAppendFilter *merger = vtkAppendFilter::New();<br><br>&nbsp;&nbsp; for( each chunk )<br>&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp; //filter &amp; process<br>&nbsp;&nbsp;&nbsp;&nbsp; // .<br>&nbsp;&nbsp;&nbsp;&nbsp; // .<br>&nbsp;&nbsp;&nbsp;&nbsp; // .<br><br>&nbsp;&nbsp;&nbsp;&nbsp; merger-&gt;AddInput( filterAndProc-&gt;GetOutput() );
<br>&nbsp;&nbsp; }<br><br>&nbsp;&nbsp; merger-&gt;Update();<br><br>&nbsp;&nbsp; vtkUnstructuredGrid *result = merger-&gt;GetOutput();<br>&nbsp;&nbsp; result-&gt;Update();<br><br>&nbsp;&nbsp; merger-&gt;Delete(); // this ends up causing segfault later!!<br><br>&nbsp;&nbsp; return result;
<br>}<br><br>I&#39;m obviously creating a leak by not Delete&#39;ing the append filter I new&#39;d, so<br>the question is why is this happening and what to do? I have a confession to<br>make, I&#39;m still using 4.4.<br>
<br>
--<br><br>Burlen Loring<br>Space Science Center<br>Institute for the Study of Earth, Oceans, and Space<br>University of New Hampshire<br>39 College Road, Durham, NH 03824<br>Phone: 603-862-1140<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" onclick="return top.js.OpenExtLink(window,event,this)">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" onclick="return top.js.OpenExtLink(window,event,this)">http://www.vtk.org/mailman/listinfo/vtkusers</a><br></blockquote></div><br><br clear="all"><br>
</span></div><span class="sg">-- <br>----------------------------------------<br>Randall Hand<br>Visualization Scientist
<br>ERDC MSRC-ITL

</span><br clear="all"><br>-- <br>----------------------------------------<br>Randall Hand<br>Visualization Scientist<br>ERDC MSRC-ITL