I have found a problem with the MFC CHtmlView class in an MDI app. Repeatedly opening and closing windows causes a progressive drain on memory. I’ve researched the problem and found the MSDN article about the BSTR problem (http://support.microsoft.com/kb/241750), implemented those fixes, but there is still a large drain occurring. I’ve identified the problem in both VC8 and VC9, have tried to assure that all interfaces are truly being released, but am totally stumped.
The easiest way to see this is to use the MFC AppWizard (vc8 or vc9) to create a standard MDI app, only change the default CView to a CHtmlView. Compile and run the app in debug, and the app will automatically open a new html window to MSDN. Open the TaskManager to follow the memory used by the app. Close the open window. Then each time you reopen and close a new window you’ll see a definite increase in the memory being held by the app. Once the app is closed though it show no leaks.
If anyone has any information, I'd appreciate hearing from you.
Thanks in advance, Steve Johnson