[vtkusers] Deleting ImageData Inside Loop

Jochen K. jochen.kling at email.de
Mon Jun 18 17:44:09 EDT 2012


Hi Matheus,

I don't know a reason for the crash but I can show you how to use
vtkSmartPointer:
  #include "vtkSmartPointer.h"

...

instead of calling 
  vtkStructuredPointsReader *Reader = vtkStructuredPointsReader::New(); 

you should call
  vtkSmartPointer<vtkStructuredPointsReader> Reader =
vtkSmartPointer<vtkStructuredPointsReader>::New();

...

You don't have to take care for freeing up memory anymore.


best regards

Jochen


--
View this message in context: http://vtk.1045678.n5.nabble.com/Deleting-ImageData-Inside-Loop-tp5713986p5713989.html
Sent from the VTK - Users mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120618/567bd420/attachment.htm>


More information about the vtkusers mailing list