Microsoft KB Archive/940972

= Windows Internet Explorer may crash when you visit a Web application that contains a custom ActiveX control and then you try to close Internet Explorer =

Article ID: 940972

Article Last Modified on 8/10/2007

-

APPLIES TO


 * Microsoft Internet Explorer (Programming)

-



SYMPTOMS
You visit a Web application that contains a custom ActiveX control in Windows Internet Explorer. When you try to close Internet Explorer, Internet Explorer may crash.



CAUSE
This behavior occurs if the ActiveX control does not correctly release all resources. For example, circular references may cause this behavior. If the object lifetimes are not appropriately managed, the ActiveX control may cause Internet Explorer to crash when you try to close the browser.



RESOLUTION
To resolve this behavior, use one of the following methods:

Method 1
In the Hide event of the UserControl object, release all the object references that include the object references to the ActiveX control.

Method 2
In the UserControl object, create a method to clean up the object references. Call this method from the window_onunload event of the Web application.



STATUS
This behavior is by design.

