Sign in with Microsoft
Sign in or create an account.
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.


Consider the following scenario:

  • You develop a web browser control host application or an ActiveX control.

  • The application or ActiveX control references the enumerator object from a collection interface of an HTML page. To create this functionality, see the following guidelines:

    • In C++, the enumerator is obtained by calling the get__newEnum function of a collection interface.  An example of a collection interface is IHTMLElementCollection, and this is usually obtained by calling IHTMLDocument2::get_all.

    • In Visual Basic, this step is performed behind the scenes in a foreach construct over a collection (for example, the document.all collection).

  • You run the application on a computer that has Internet Explorer 10 installed.

In this scenario, a memory leak occurs.

Note Because ActiveX controls consume more memory than native HTML elements, the memory leak is more obvious if one of the elements in the collection is an ActiveX control.

For example, a memory leak occurs when you use the following C++ code in a function of a web browser control host application. In this situation, a large volume of memory is leaked if one of the elements on the webpage is an ActiveX control.
void CEnumLeakDlg::OnBnClicked()
IDispatch* pDocDisp = m_web.get_Document();
IHTMLDocument2* pDoc = NULL;
HRESULT hr = pDocDisp->QueryInterface(IID_IHTMLDocument2, (void**)&pDoc);
IHTMLElementCollection* pElColl = NULL;
hr = pDoc->get_all(&pElColl);
IUnknown* pEnum = NULL;
hr = pElColl->get__newEnum(&pEnum);


To resolve this issue, install the following update:

2862772 MS13-059: Cumulative security update for Internet Explorer: August 13, 2013

More Information

For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:

824684 Description of the standard terminology that is used to describe Microsoft software updates

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?

Thank you for your feedback!