<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Dear David,<br><br>Many thanks!&nbsp; - that seems to work fine with the vtkSmartPointer's and the vtkstd::vector.<br><br>As an amateur C programmer (who incrementally learns C++ only on a need-to basis), I found the example code (from your link) quite freaky to begin with.<br>I am now using vtkSmartPointer to make arrays of all the intermediate surface objects (vtkDoubleArray, vtkPolyData, vtkPoints, vtkCellArray, vtkPolyDataMapper,vtkActor) - I hadn't seen code before where one uses the same variable name in a loop over and over, e.g. <br><br>&nbsp;for (is=0; is&lt;Ns;is++) {<br>...<br>&nbsp;vtkSmartPointer&lt;vtkPolyData&gt; surf = vtkSmartPointer&lt;vtkPolyData&gt;::New();<br>...<br>}<br><br>I guess those pointers really are "smart".&nbsp; After searching around, it appears that vtkSmartPointer's do not even need to be Delete'd at the end of the
 code.<br><br>Many thanks,<br>MT<br><br><br><br></td></tr></table><br>__________________________________________________<br>Do You Yahoo!?<br>Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails. <br>http://mail.yahoo.com