Hi...
I added a CHtmlView control to my project without using AppWizard. When my application closes CHtmlView crashes.
I stopped this problem by overriding CHtmlView:
ostNcDestroy and leaving the function blank. But now when my application closes it no longer crashes, but instead reports back a memory leak. I've tried a few diffrent ways of destroying the CHtmlView class but it either crashes or causes a memory leak.
The way I detect for memory leaks is within CApp::InitInstance I have the following code:
and when the application closes in CApp::ExitInstance() I have:
Is there a way of resolving this memory leak?
Thank you...
I added a CHtmlView control to my project without using AppWizard. When my application closes CHtmlView crashes.
I stopped this problem by overriding CHtmlView:
The way I detect for memory leaks is within CApp::InitInstance I have the following code:
Code:
#ifdef _DEBUG
FirstState.Checkpoint();
#endif
and when the application closes in CApp::ExitInstance() I have:
Code:
#ifdef _DEBUG
EndState.Checkpoint();
if (CompareState.Difference(FirstState,EndState)!=0)
{
MessageBox(GetDesktopWindow(),"Leak was detected within program","",MB_OK);
}
#endif
Is there a way of resolving this memory leak?
Thank you...