<span class="gmail_quote"><br></span>I believe destroying the AppendFilter will resulting in deleting the Output Dataset as well. to get around this, you can try something like this:<br><br><div style="margin-left: 40px;">
merger->update();<br>vtkUnstructuredGrid *result = vtkUnstructuredGrid::New();
<br>result->DeepCopy(merger->GetOutput());<br><br>merger->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> <<a href="mailto:burlen@apollo.sr.unh.edu" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
burlen@apollo.sr.unh.edu</a>> 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'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'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's some thing like this:<br><br>vtkUnstructuredGrid *processData( vector<vtkUnstructuredGrid *> &chunks )<br>
{<br> vtkAppendFilter *merger = vtkAppendFilter::New();<br><br> for( each chunk )<br> {<br> //filter & process<br> // .<br> // .<br> // .<br><br> merger->AddInput( filterAndProc->GetOutput() );
<br> }<br><br> merger->Update();<br><br> vtkUnstructuredGrid *result = merger->GetOutput();<br> result->Update();<br><br> merger->Delete(); // this ends up causing segfault later!!<br><br> return result;
<br>}<br><br>I'm obviously creating a leak by not Delete'ing the append filter I new'd, so<br>the question is why is this happening and what to do? I have a confession to<br>make, I'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