Microsoft KB Archive/922952

From BetaArchive Wiki
Knowledge Base


BUG: A memory leak may occur in Internet Explorer on a Windows CE 5.0-based device when you view a Web page that contains a frame that automatically refreshes a Web page

Article ID: 922952

Article Last Modified on 5/21/2007



APPLIES TO

  • Microsoft Windows CE 5.0



SYMPTOMS

Consider the following scenario:

  • You view a Web page in Microsoft Internet Explorer on a Windows CE 5.0-based device.
  • The Web page contains a frame that automatically loads and refreshes a Web page.
  • The Web page that is loaded in the frame contains script code that dynamically allocates event handlers.

In this scenario, a memory leak may occur. Additionally, you may receive one of the following error messages:

Error message 1


Program memory is very low. You must select one task to close, or increase the amount of program memory, if available.

Error message 2


Program memory is critically low. You must select one task to terminate (unsaved changes will be lost), or increase the amount of program memory, if available.

Note This problem is more likely to occur if Internet Explorer remains open for an extended time.

CAUSE

Web pages can allocate event handlers dynamically. The dynamic allocations are disconnected from the object whenever the Web page is refreshed. Therefore, the dynamic allocations remain in memory until Internet Explorer is closed. This behavior causes a memory leak.

WORKAROUND

To work around this problem, you can release all dynamically allocated event handlers in the onunload event for the Web page. For more information about the onunload event, visit the following Microsoft Developer Network (MSDN) Web site:

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.

Keywords: kbtshoot kbbug KB922952