[vtkusers] Re: Getting debug errors when deleting objects !!!
Goodwin Lawlor
goodwin.lawlor at ucd.ie
Sat Apr 7 09:03:30 EDT 2007
Syn3DDM wrote:
> Hi
> I am using vtk in a MFC application. My probleme is that when I close the
> main window I got a debug errors ! I wrote the deleting code in the
> destrutor like this :
> CVTKMFCView::~CVTKMFCView()
> {
> this->iren->Delete();
> this->CameraStyle->Delete();
> this->renWin->Delete();
> this->ren->Delete();
> this->Actor->Delete();
> this->Mapper->Delete();
> this->Polydata->Delete();
> this->PLYReader->Delete();
> // Delete the the objects used to form the visualisation.
> }
>
> this code causes a debug errors while closing the main window ! but when I
> let the destructor empty like this
>
> CVTKMFCView::~CVTKMFCView()
> {
> }
>
> I got no errors !! No comments !!
> Please help me !
> Thank you in advance.
My guess is that you dont need "this->Polydata->Delete()"... if its an
output from a filter, the filter will do the deallocation.
Goodwin
More information about the vtkusers
mailing list