I have an MFC application which needs to display a webpage. I’ve added a CHtmlView through CSingleDocTemplate which spawns a window and displays the page fine but it leaks memory when running javascript.
The page I’m looking at is genereated by Madcap flare and so it very heavy with javascript. I’m losing about 4K a second just sitting watching the page.
I’ve tried to reduce the problem by letting the user close the document but then I run into a problem with not knowing if the CFrameWnd was closed or not in the main application so not knowing if I need to create a new one or just reuse it.
I’m running this on windows 7 with IE9 installed so if I’m right I should be well clear of the old IE javascript circular references bug.
Does it happen in both Release and Debug build? I’ve seen similar (somewhat deterministic) errors when freeing dangling pointers or blowing the stack. With a bit of bad luck, the undefined behavior from faulty code could produce memory leaks.
I’m just guessing here 🙂