[vtkusers] My program refuses to exit

Cameron Burnett w_e_b_m_a_s_t_e_r_6_9 at hotmail.com
Thu May 15 10:22:51 EDT 2008


Whenever I close my program (with either the exit button i made, or the X at the top-right of the screen) the process keeps on going. I have to actually click the stop button on visual c++ in order to stop it, and if I run it outside vc++ I have to close the process in the task manager.

I've got a feeling its got something to do with the render window interactor I made for my clipping plane box widget, since iren is actually an infinite loop. Note that I've called Delete on absolutely everything, and tried various ways to remove or disable (or both) the iren, but to no avail.

The reason why this is such a problem is because originally my RAM was free after this method, and now it keeps holding quite a lot (which is a huge problem for the rest of my stuff). So I'm guessing that if I fix the exit problem I will also fix my memory release problem also.

Maybe someone can have a look at the problem section and see if there is anything I need to do? I've called delete on everything below this section, so don't worry about that.

Thanks.


    vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();
    iren->SetRenderWindow(this->pvtkMFCWindow->GetRenderWindow());

    vtkInteractorStyleTrackballCamera *style = vtkInteractorStyleTrackballCamera::New();
    iren->SetInteractorStyle(style);
    style->Delete();

    boxWidget = vtkBoxWidget::New();
    boxWidget->SetInteractor(iren);
    boxWidget->SetPlaceFactor(1);
    boxWidget->SetProp3D(volume);
    boxWidget->PlaceWidget();
    boxWidget->InsideOutOn();

    vtkMyCallback *callback = vtkMyCallback::New();  
    callback->volumeMapper = mapper;
    boxWidget->AddObserver(vtkCommand::InteractionEvent, callback);
    callback->Delete();

    boxWidget->On();

    iren->Initialize();
    iren->Start();

    iren->Delete();

_________________________________________________________________
Be part of history. Take part in Australia's first e-mail archive with Email Australia.
http://emailaustralia.ninemsn.com.au
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080516/b5d62ff1/attachment.htm>


More information about the vtkusers mailing list