[vtkusers] Unhandled exception at the time of Unregistering vtkSmartPointer

cel02000 cel02000 at yahoo.com
Mon Jun 11 19:19:00 EDT 2012


David,

How should delete a vector of vtkPolyData objects from memory? I have
declared it and destruct it from memory like the following:

// Declaration
vector< vtkPolyData * > vectorOfPolyData;

// Deleting from memory
for (size_t p = 0; p < vectorOfPolyData.size(); ++p)
    delete vectorOfPolyData[p];
vectorOfPolyData.clear();

Compiler gives me the following error:
1>.\mycode.cpp(346) :  error C2248: 'vtkPolyData::~vtkPolyData' : cannot
access protected member declared in class 'vtkPolyData'
1>        C:\VTK580Compiled\include\vtk-5.8\vtkPolyData.h(492) : compiler
has generated 'vtkPolyData::~vtkPolyData' here
1>        C:\VTK580Compiled\include\vtk-5.8\vtkPolyData.h(72) : see
declaration of 'vtkPolyData'

--
View this message in context: http://vtk.1045678.n5.nabble.com/Unhandled-exception-at-the-time-of-Unregistering-vtkSmartPointer-tp5713691p5713761.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list