|
-
June 1st, 2005, 07:51 PM
#1
Problem releasing CWebBrowser2
Hi code gurus!
I've been searching for information on how to solve this problem but I don't even have a clue.
There is a memory leak when I close the mainframe of the application, I've detected when the webBrowser object is not created then this problem doesn't happen so I think maybe I'm not releasing something.
Dumping objects ->
C:\SYSTRAY2\Cliente\pantprot.cpp(58) : {124} client block at 0x00C01730, subtype 0, 60 bytes long.
a CWebBrowser2 object at $00C01730, 60 bytes long
Object dump complete.
Some code:
m_browser = new CWebBrowser2;
BOOL btw;
btw=m_browser->Create(NULL,NULL,WS_VISIBLE, rect, this, IDC_WBC);
BOOL d=m_browser->DestroyWindow();
free(m_browser);
m_browser=NULL;
But when i try to exit application this assertion is raised:
CMDTARG.CPP
CCmdTarget::~CCmdTarget()
{
#ifndef _AFX_NO_OLE_SUPPORT
if (m_xDispatch.m_vtbl != 0)
((COleDispatchImpl*)&m_xDispatch)->Disconnect();
ASSERT(m_dwRef <= 1); <------- current value m_dwRef = 2
#endif
#ifdef _AFXDLL
m_pModuleState = NULL;
#endif
}
Please help me because I don't even know what does this assertion means.
As an additional information the dialog that contains this browser object is called within a thread, I don't know if this has something to do in this case.
Regards
Antonio
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|