[vtkusers] RE:Comment on: *The solution* Re: Access violations in MFC sample

Andrew J. P. Maclean a.maclean at acfr.usyd.edu.au
Tue Dec 11 17:47:57 EST 2001


It is somewhere else in the code. I am using the classes
vtkMFCRenderView, vtkMFCView, vtkMFCDocument in my code with no memory
leaks at all. In the example you have provided, the debugger is
referring to vtkOpenGLLight.

___________________________________________
Andrew J. P. Maclean
Postal:
Australian Centre for Field Robotics
The Rose Street Building J04
The University of Sydney  2006  NSW
AUSTRALIA
Room:
106
Phone:
+61 2 9351 3283
Fax:
+61 2 9351 7474

http://www.acfr.usyd.edu.au/
___________________________________________


-----Original Message-----
From: Sebastien BARRE [mailto:sebastien.barre at kitware.com] 
Sent: Wednesday, 12 December 2001 09:38
To: a.maclean at acfr.usyd.edu.au
Cc: 'Joco Filipe de Castro Ferreira'; 'Lista do VTK'
Subject: Re: [vtkusers] RE:Comment on: *The solution* Re: Access
violations in MFC sample

At 12/12/2001 09:22 AM, Andrew J. P. Maclean wrote:
>This is strange. In int vtkMFCRenderView::OnCreate(LPCREATESTRUCT
>lpCreateStruct)
>I have:
>{
>   if (vtkMFCView::OnCreate(lpCreateStruct) == -1)
>     return -1;
>
>   // TODO: Add your specialized creation code here
>   this->RenderWindow->SetParentId(lpCreateStruct->hwndParent);
>   this->RenderWindow->SetWindowId(this->m_hWnd);
>   this->RenderWindow->WindowInitialize();
>   return 0;
>}
>
>The key is to call vtkMFCView::OnCreate(...) before setting the
>Parent/Window ID and then initializing.

I do not see any difference between this code and the current CVS code.

>As I said, I have no access violations at all with the above paradigm.
>After checking with the debugger, everything seems to be initialized
and
>allocated correctly.

Build -> Start Debug -> Go
then exit the example

Look at the debug win:
Detected memory leaks!
Dumping objects ->
{713} normal block at 0x07291BC8, 15 bytes long.
  Data: <vtkOpenGLLight > 76 74 6B 4F 70 65 6E 47 4C 4C 69 67 68 74 00
{712} normal block at 0x07291888, 12 bytes long.


--
Sebastien Barre




More information about the vtkusers mailing list