Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CHtmlView Mem Leak

Status
Not open for further replies.

cpfc

Programmer
Aug 4, 2003
23
0
0
GB
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::postNcDestroy 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:

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...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top