[vtk-developers] Missing [window close] in vtkCocoaRenderWindow

Sean McBride sean at rogue-research.com
Thu Feb 25 11:29:41 EST 2010


On 2/19/10 2:16 PM, David Gobbi said:

>I wonder if there is any harm in calling "close" multiple times?  I've
>added a [window close] to DestroyWindow and so far everything seems to
>be peachy keen

I've added:

  if (this->WindowCreated)
    {
    NSWindow* win = (NSWindow*)this->GetRootWindow();
    [win close];
    this->WindowCreated = 0;
    }

near the end of DestroyWindow, just before:

  this->SetWindowId(NULL);
  this->SetParentId(NULL);
  this->SetRootWindow(NULL);

and this change doesn't seem to cause me any problems.

-- 
____________________________________________________________
Sean McBride, B. Eng                 sean at rogue-research.com
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada





More information about the vtk-developers mailing list