[vtkusers] How to delete an interactorstyle in runtime?

sercani sercanimailgroups at gmail.com
Fri Mar 5 09:04:49 EST 2010


Hi everyone,
I've written subclass of vtkInteractorStyleImage and set it to an 
interactor, but i need to set another custom interactorstyle in runtime. 
When i want to delete the current custom interactor style like this:
if(cis->GetEnabled())
     {
         cis->EnabledOff();
         cis->SetInteractor(0);
         cis->Delete();
     }

it throws :

"ERROR: In ..\..\VTK_Source\VTK\Common\vtkObject.cxx, line 160
vtkObject (0155E128): Trying to delete object with non-zero reference 
count."

How can i delete this custom interactorstyle and set another custom 
interactorstyle as current interactor's new interactorstyle?



More information about the vtkusers mailing list