[vtkusers] Bug in SetRenderWindow(NULL) ?!

de Boer Ingo I.deBoer at polytec.de
Mon Oct 20 10:18:11 EDT 2003


Hi,

maybe there is some kind of bug in using
vtkWin32OpenGLRenderWindow with MFC ?!

I have written a small sample. The view gets
initialized with

pvtkWin32OpenGLRW->SetParentId(::GetParent(m_hWnd));
pvtkWin32OpenGLRW->SetWindowId(m_hWnd);

With this I have to set the render window to NULL in
the destructor, like
 if (pvtkRenderer) pvtkRenderer->SetRenderWindow(NULL);
Also, when I look at the memory with DXCapsViewer.exe
there is a memory leak, although I have closed the window/view.
This memory leak only disappears, when I close the application.

The error/problem does not appear when I use
pvtkWin32OpenGLRW->SetParentId(m_hWnd);
and not call pvtkWin32OpenGLRW->SetWindowId. In this case, I 
don't have to set the RenderWindow to NULL and I don't have
any memory leaks.

Is this intended or is this a bug ??

greets
  Ingo

---
Dr.-Ing. Ingo H. de Boer

Polytec GmbH
Polytec-Platz 1-7, 76337 Waldbronn, Germany
phone: ++49 7243 604 106
fax  : ++49 7243 604 255
 



More information about the vtkusers mailing list