memory leak in CComCreator::CreateInstance?
Hello
I've got a working MAPI custom form for Outlook written in VC++ with Visual
Studio 2005 SP1. When running the exe in debug mode, calling the form from
Outlook and then closing the exe, the debugger shows me a memory leak (or
similar):
Detected memory leaks!
Dumping objects ->
{115} normal block at 0x00DBA8A8, 68 bytes long.
Data: < r x r D r > B4 EC 72 00 78 EC 72 00 44 EC 72 00 01 00 00 00
Object dump complete.
I assume there is no source code line because it's inside of MFC or so.
afx.h is included. Defining _CRTDBG_MAP_ALLOC, _CRTDBG_MAP_ALLOC_NEW or so
doesn't change anything. I haven't tried Tip 40 of:
http://msdn.microsoft.com/msdnmag/issues/1200/bugslayer/
But anyway:
When breaking at allocation 115 which causes the problem, I've got the
following call stack (top to bottom):
....
my.exe!AfxInternalPumpMessage()
user32.dll, ole32.dll, rpcrt4.dll, etc.
my.exe!ATL::CComClassFactory::CreateInstance() (line 3299 in atlcom.h on
hRes=m_pfnCreateInstance(pUnkOuter,riid,ppvObj);)
my.exe!ATL::CComCreator2<>::CreateInstance() (line 1880 in atlcom.h on
T2::CreateIntance(pv,riid,ppv);)
my.exe!ATL::CComCreator<>::CreateIntance() (line 1799 in atlcom.h on
ATLTRY(p=new T1(pv)))
my.exe!operator new
....
Is there anything I can do about this or is the message wrong?
Eric
P.S. Please forgive me if I posted to an unappropriate newsgroup.
(crossposting to MAPI, ATL, MFC, MFCOLE)