MFC applications leak GDI objects on computers that are running Windows Server 2003 or Windows XP
This article was previously published under Q319740 On This PageSYMPTOMS
When you run a Microsoft Foundation Classes (MFC) application on a computer that is running Microsoft Windows XP with Service Pack 2 (SP2) installed, you may see memory leaks for Graphics Device Interface (GDI) objects when you create and destroy child windows. To see the memory leaks, view the GDI objects of the process in Task Manager. This problem also occurs on a computer that is running Windows Server 2003 when the Themes service is started. By default, the Themes service is disabled on Windows Server 2003. CAUSE
This problem occurs because of a bug in the implementation of the new theming interface.
RESOLUTIONHotfix informationWindows Server 2003A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, contact Microsoft Customer Service and Support to obtain the hotfix. Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site: http://support.microsoft.com/contactus/?ws=support (http://support.microsoft.com/contactus/?ws=support) Note The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.PrerequisitesNo prerequisites are required.Restart requirementYou must restart your computer after you apply this hotfix.Hotfix replacement informationThis hotfix does not replace any other hotfixes.File informationThe English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.Windows Server 2003, x86-based versions
Windows Server 2003, Itanium-based versions
Windows XPPrerequisitesTo install this hotfix, you must have Windows XP Service Pack 2 (SP2) installed.Restart requirementYou must restart your computer after you apply this hotfix.Hotfix replacement informationThis hotfix does not replace any other previously released hotfixes.File informationThe English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
The following file is available for download from the Microsoft Download Center: Download the Update for Windows XP (KB319740) package now. (http://www.microsoft.com/downloads/details.aspx?FamilyId=9B5EDFC8-A4BB-4080-9063-6518166E2DAB&displaylang=en)Release Date: March 21, 2006 For more information about how to download Microsoft support files, click the following article number to view the article in the Microsoft Knowledge Base: 119591 (http://support.microsoft.com/kb/119591/) How to obtain Microsoft support files from online services
Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help prevent any unauthorized changes to the file.
WORKAROUND
If this GDI leak is seriously degrading performance, you can turn off the new user interface theming in Windows XP. To do this, follow these steps:
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section. APPLIES TO
| Article Translations
|
Back to the top
