Re: ATL host window memory leak for HTTP URL
David Liebtag <DavidLiebtag@vermontel.net> wrote:
apl2key.dll!ATL::CSimpleArray<unsigned
short,ATL::CSimpleArrayEqualHelper<unsigned short> >::Add(const
unsigned short & t=49779) Line 144 + 0x12 C++
apl2key.dll!ATL::AtlWinModuleRegisterClassExA(ATL::_ATL_WIN_MODULE70
* pWinModule=0x0051d170, const tagWNDCLASSEXA * lpwc=0x005050f0)
Whenever ATL registers window class, it stores the ATOM returned by
RegisterClassEx in a global variable. Even after the window is
destroyed, the class is still registered.
It so happens that AtlAxWin71 needs to create an auxilliary window (and
register its class the first time round) when activating a hosted
control.
If you create another instance of AtlAxWin71, it won't register the
class again but will pick up existing registration. What you see is not
really a leak, since it doesn't accumulate with repeated use (at least,
it shouldn't as far as I can see). You are seeing a one-time allocation
cached in a global variable.
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925