Menu

segfault after vtkRenderWindow::Delete

Help
2006-03-27
2013-04-22
  • soren hauberg

    soren hauberg - 2006-03-27

    The following code gives me a segfault (using octave-2.1.72 and octaviz-cvs):

    win = vtkRenderWindow();
    win.Delete()
    win

    Note the missing semicolon in the last line (win gets printed). If the semicolon is in place everything is fine. When a vtk_object is deallocated it should probably be replaced with a empty list or something else.

     
    • Dragan Tubic

      Dragan Tubic - 2006-03-28

      I'm actually surprised that putting a semicolon works. Anyway, you shouldn't be using Delete() (I'll remove it in the next release) since it removes the VTK object but octave variable still points to it. use
      clear win
      if you want to delete a VTK object.

      Cheers,

      Dragan

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.