[vtkusers] Deleting vtkoutputwindows used by SetInstance

Mwoua david.levy at leddartech.com
Fri Apr 14 15:46:24 EDT 2017


Hello,
I'm using Qt + VTK on windows.

When I open my VTK window I redirect vtk error message using (in my
constructor)
 
        vtkSmartPointer<CustomOutputWindow> lOutputWindow =
vtkSmartPointer<CustomOutputWindow>::New();
        vtkOutputWindow::SetInstance(lOutputWindow);
        lOutputWindow->Delete(); // now SetInstance owns the reference

So when I close my window, I have nothing that is using VTK left, so I would
like to delete my output window. (calling Delete() cause a read access
violation)

Also, if I try to call SetInstance again, with another CustomOutputWindow, I
also have a read access violation (vtkOutputWindow::Instance->Delete(); in
file vtkOutputWindow.cxx)

How can I delete my object?


PS : setinstance also prevent my display from working on an older computer,
if I dont use it, I have a message saying that the chipset is old and might
not work, but besides that it works. If I try to use setinstance, the
display does not work.

Thanks,
David



--
View this message in context: http://vtk.1045678.n5.nabble.com/Deleting-vtkoutputwindows-used-by-SetInstance-tp5742892.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list