Microsoft KB Archive/822479

= FIX: Memory Leak When Loading and Unloading Dynamic-Link Libraries =

Article ID: 822479

Article Last Modified on 5/27/2005

-

APPLIES TO


 * Microsoft Windows CE Platform Builder 2.12

-



SYMPTOMS
If a DLL module is repeatedly loaded and unloaded by an application, the DLL module may leak memory if it has any global C++ variable whose class has an implicit or explicit destructor.



CAUSE
The implementation of the C-runtime function, atexit, allocates memory that is not freed when a DLL that calls atexit is unloaded.

The atexit function is also used to implement C++ global destructors. This implementation causes DLLs that have global C++ variables to leak when unloaded.



Hotfix Information
A supported software update is now available from Microsoft as Windows CE 2.12 Core OS QFE 822479. To resolve this problem immediately, click the following article number for information about obtaining Windows CE Platform Builder and core operating system software updates:

837392 How to locate core operating system fixes for Microsoft Windows CE Platform Builder products

Prerequisites
Install all previously released updates (QFEs) for this version of the Windows CE operating system.

Restart Requirement
You do not have to restart your computer after you apply this hotfix.

Hotfix Replacement Information
This hotfix does not replace any other hotfixes.

File Information
The English version of this package has the file attributes (or later) that are listed in the following table.   Date         Time   Version            Size    File name --

19-Jul-2003 00:12  2.12.0.37       5,421,656  Wce212qfe37.exe The English version of this fix has the file attributes (or later) 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.   Date         Time                      Size    File name --

Path: Qfe37\Public\Common\Oak\Lib\Arm\Arm720\Ce\Debug 03-Jul-2003 21:46                     35,640  Ccrtstrt.lib 03-Jul-2003 21:46                     53,248  Ccrtstrt.pdb 16-Jul-2003 21:44                    848,618  Fulllibc.lib 16-Jul-2003 21:44                     36,864  Fulllibc.pdb

Path: Qfe37\Public\Common\Oak\Lib\Arm\Arm720\Ce\Retail 03-Jul-2003 21:45                     36,180  Ccrtstrt.lib 03-Jul-2003 21:45                     53,248  Ccrtstrt.pdb 16-Jul-2003 21:43                    812,266  Fulllibc.lib 16-Jul-2003 21:43                     36,864  Fulllibc.pdb

Path: Qfe37\Public\Common\Oak\Lib\Arm\Sa1100\Ce\Debug 03-Jul-2003 21:48                     33,682  Ccrtstrt.lib 03-Jul-2003 21:48                     53,248  Ccrtstrt.pdb 16-Jul-2003 21:02                    844,964  Fulllibc.lib 16-Jul-2003 21:02                     36,864  Fulllibc.pdb

Path: Qfe37\Public\Common\Oak\Lib\Arm\Sa1100\Ce\Retail 03-Jul-2003 21:47                     34,152  Ccrtstrt.lib 03-Jul-2003 21:47                     53,248  Ccrtstrt.pdb 16-Jul-2003 21:01                    808,232  Fulllibc.lib 16-Jul-2003 21:01                     36,864  Fulllibc.pdb

Path: Qfe37\Public\Common\Oak\Lib\Mips\R3000\Ce\Debug 03-Jul-2003 20:47                     47,956  Ccrtstrt.lib 03-Jul-2003 20:47                     53,248  Ccrtstrt.pdb 16-Jul-2003 21:17                  1,065,020  Fulllibc.lib 16-Jul-2003 21:17                     36,864  Fulllibc.pdb

Path: Qfe37\Public\Common\Oak\Lib\Mips\R3000\Ce\Retail 03-Jul-2003 20:46                     48,928  Ccrtstrt.lib 03-Jul-2003 20:46                     53,248  Ccrtstrt.pdb 16-Jul-2003 21:16                  1,058,134  Fulllibc.lib 16-Jul-2003 21:16                     36,864  Fulllibc.pdb

Path: Qfe37\Public\Common\Oak\Lib\Mips\R4100\Ce\Debug 03-Jul-2003 20:59                     47,956  Ccrtstrt.lib 03-Jul-2003 20:59                     53,248  Ccrtstrt.pdb 16-Jul-2003 21:19                  1,065,124  Fulllibc.lib 16-Jul-2003 21:19                     36,864  Fulllibc.pdb

Path: Qfe37\Public\Common\Oak\Lib\Mips\R4100\Ce\Retail 03-Jul-2003 20:58                     48,912  Ccrtstrt.lib 03-Jul-2003 20:58                     53,248  Ccrtstrt.pdb 16-Jul-2003 21:19                  1,057,598  Fulllibc.lib 16-Jul-2003 21:19                     36,864  Fulllibc.pdb

Path: Qfe37\Public\Common\Oak\Lib\Mips\R4111\Ce\Debug 03-Jul-2003 21:00                     47,956  Ccrtstrt.lib 03-Jul-2003 21:00                     53,248  Ccrtstrt.pdb 16-Jul-2003 21:23                  1,065,124  Fulllibc.lib 16-Jul-2003 21:23                     36,864  Fulllibc.pdb

Path: Qfe37\Public\Common\Oak\Lib\Mips\R4111\Ce\Retail 03-Jul-2003 21:00                     46,860  Ccrtstrt.lib 03-Jul-2003 21:00                     53,248  Ccrtstrt.pdb 16-Jul-2003 21:21                  1,009,114  Fulllibc.lib 16-Jul-2003 21:21                     36,864  Fulllibc.pdb

Path: Qfe37\Public\Common\Oak\Lib\Mips\R4300\Ce\Debug 03-Jul-2003 21:02                     47,956  Ccrtstrt.lib 03-Jul-2003 21:02                     53,248  Ccrtstrt.pdb 16-Jul-2003 21:26                    911,524  Fulllibc.lib 16-Jul-2003 21:26                     36,864  Fulllibc.pdb

Path: Qfe37\Public\Common\Oak\Lib\Mips\R4300\Ce\Retail 03-Jul-2003 21:01                     48,912  Ccrtstrt.lib 03-Jul-2003 21:01                     53,248  Ccrtstrt.pdb 16-Jul-2003 21:24                    903,492  Fulllibc.lib 16-Jul-2003 21:24                     36,864  Fulllibc.pdb

Path: Qfe37\Public\Common\Oak\Lib\Ppc\Ppc403\Ce\Debug 03-Jul-2003 21:36                     37,264  Ccrtstrt.lib 03-Jul-2003 21:36                     53,248  Ccrtstrt.pdb 16-Jul-2003 21:37                    832,448  Fulllibc.lib 16-Jul-2003 21:37                     36,864  Fulllibc.pdb

Path: Qfe37\Public\Common\Oak\Lib\Ppc\Ppc403\Ce\Retail 03-Jul-2003 21:35                     37,786  Ccrtstrt.lib 03-Jul-2003 21:35                     53,248  Ccrtstrt.pdb 16-Jul-2003 21:35                    795,616  Fulllibc.lib 16-Jul-2003 21:35                     36,864  Fulllibc.pdb

Path: Qfe37\Public\Common\Oak\Lib\Ppc\Ppc821\Ce\Debug 03-Jul-2003 21:40                     37,264  Ccrtstrt.lib 03-Jul-2003 21:40                     53,248  Ccrtstrt.pdb 16-Jul-2003 21:41                    832,448  Fulllibc.lib 16-Jul-2003 21:41                     36,864  Fulllibc.pdb

Path: Qfe37\Public\Common\Oak\Lib\Ppc\Ppc821\Ce\Retail 03-Jul-2003 21:39                     37,786  Ccrtstrt.lib 03-Jul-2003 21:39                     53,248  Ccrtstrt.pdb 16-Jul-2003 21:38                    795,616  Fulllibc.lib 16-Jul-2003 21:38                     36,864  Fulllibc.pdb

Path: Qfe37\Public\Common\Oak\Lib\Shx\Sh3\Ce\Debug 03-Jul-2003 20:42                     28,316  Ccrtstrt.lib 03-Jul-2003 20:42                     53,248  Ccrtstrt.pdb 16-Jul-2003 21:05                    946,694  Fulllibc.lib 16-Jul-2003 21:05                     36,864  Fulllibc.pdb

Path: Qfe37\Public\Common\Oak\Lib\Shx\Sh3\Ce\Retail 03-Jul-2003 20:41                     29,892  Ccrtstrt.lib 03-Jul-2003 20:41                     53,248  Ccrtstrt.pdb 16-Jul-2003 21:04                    886,176  Fulllibc.lib 16-Jul-2003 21:04                     36,864  Fulllibc.pdb

Path: Qfe37\Public\Common\Oak\Lib\Shx\Sh4\Ce\Debug 03-Jul-2003 20:45                     28,168  Ccrtstrt.lib 03-Jul-2003 20:45                     53,248  Ccrtstrt.pdb 16-Jul-2003 21:12                    922,542  Fulllibc.lib 16-Jul-2003 21:12                     36,864  Fulllibc.pdb

Path: Qfe37\Public\Common\Oak\Lib\Shx\Sh4\Ce\Retail 03-Jul-2003 20:44                     29,742  Ccrtstrt.lib 03-Jul-2003 20:44                     53,248  Ccrtstrt.pdb 16-Jul-2003 21:09                    858,812  Fulllibc.lib 16-Jul-2003 21:09                     36,864  Fulllibc.pdb

Path: Qfe37\Public\Common\Oak\Lib\Thumb\Arm720\Ce\Debug 14-Jul-2003 19:54                     35,788  Ccrtstrt.lib 14-Jul-2003 19:54                     53,248  Ccrtstrt.pdb 16-Jul-2003 21:53                    851,320  Fulllibc.lib 16-Jul-2003 21:53                     36,864  Fulllibc.pdb

Path: Qfe37\Public\Common\Oak\Lib\Thumb\Arm720\Ce\Retail 14-Jul-2003 19:53                     36,612  Ccrtstrt.lib 14-Jul-2003 19:53                     53,248  Ccrtstrt.pdb 16-Jul-2003 21:54                    837,560  Fulllibc.lib 16-Jul-2003 21:54                     36,864  Fulllibc.pdb

Path: Qfe37\Public\Common\Oak\Lib\X86\I486\Ce\Debug 14-Jul-2003 20:49                     32,740  Ccrtstrt.lib 14-Jul-2003 20:49                     53,248  Ccrtstrt.pdb 16-Jul-2003 20:59                    633,776  Fulllibc.lib 16-Jul-2003 20:59                     36,864  Fulllibc.pdb

Path: Qfe37\Public\Common\Oak\Lib\X86\I486\Ce\Retail 14-Jul-2003 20:48                     34,508  Ccrtstrt.lib 14-Jul-2003 20:48                     53,248  Ccrtstrt.pdb 16-Jul-2003 20:58                    610,116  Fulllibc.lib 16-Jul-2003 20:58                     36,864  Fulllibc.pdb

Path: Qfe37\Public\Common\Sdk\Lib\Arm\Arm720\Ce\Debug 16-Jul-2003 21:44                     36,352  Corelibc.lib 16-Jul-2003 21:44                     36,864  Corelibc.pdb

Path: Qfe37\Public\Common\Sdk\Lib\Arm\Arm720\Ce\Retail 16-Jul-2003 21:43                     36,892  Corelibc.lib 16-Jul-2003 21:43                     36,864  Corelibc.pdb

Path: Qfe37\Public\Common\Sdk\Lib\Arm\Sa1100\Ce\Debug 16-Jul-2003 21:02                     34,394  Corelibc.lib 16-Jul-2003 21:02                     36,864  Corelibc.pdb

Path: Qfe37\Public\Common\Sdk\Lib\Arm\Sa1100\Ce\Retail 16-Jul-2003 21:01                     34,864  Corelibc.lib 16-Jul-2003 21:01                     36,864  Corelibc.pdb

Path: Qfe37\Public\Common\Sdk\Lib\Mips\R3000\Ce\Debug 16-Jul-2003 21:17                     48,650  Corelibc.lib 16-Jul-2003 21:17                     36,864  Corelibc.pdb

Path: Qfe37\Public\Common\Sdk\Lib\Mips\R3000\Ce\Retail 16-Jul-2003 21:16                     49,622  Corelibc.lib 16-Jul-2003 21:16                     36,864  Corelibc.pdb

Path: Qfe37\Public\Common\Sdk\Lib\Mips\R4100\Ce\Debug 16-Jul-2003 21:19                     48,650  Corelibc.lib 16-Jul-2003 21:19                     36,864  Corelibc.pdb

Path: Qfe37\Public\Common\Sdk\Lib\Mips\R4100\Ce\Retail 16-Jul-2003 21:19                     49,606  Corelibc.lib 16-Jul-2003 21:19                     36,864  Corelibc.pdb

Path: Qfe37\Public\Common\Sdk\Lib\Mips\R4111\Ce\Debug 16-Jul-2003 21:23                     48,650  Corelibc.lib 16-Jul-2003 21:23                     36,864  Corelibc.pdb

Path: Qfe37\Public\Common\Sdk\Lib\Mips\R4111\Ce\Retail 16-Jul-2003 21:21                     47,554  Corelibc.lib 16-Jul-2003 21:21                     36,864  Corelibc.pdb

Path: Qfe37\Public\Common\Sdk\Lib\Mips\R4300\Ce\Debug 16-Jul-2003 21:26                     48,650  Corelibc.lib 16-Jul-2003 21:26                     36,864  Corelibc.pdb

Path: Qfe37\Public\Common\Sdk\Lib\Mips\R4300\Ce\Retail 16-Jul-2003 21:24                     49,606  Corelibc.lib 16-Jul-2003 21:24                     36,864  Corelibc.pdb

Path: Qfe37\Public\Common\Sdk\Lib\Ppc\Ppc403\Ce\Debug 16-Jul-2003 21:37                     37,970  Corelibc.lib 16-Jul-2003 21:37                     36,864  Corelibc.pdb

Path: Qfe37\Public\Common\Sdk\Lib\Ppc\Ppc403\Ce\Retail 16-Jul-2003 21:35                     38,496  Corelibc.lib 16-Jul-2003 21:35                     36,864  Corelibc.pdb

Path: Qfe37\Public\Common\Sdk\Lib\Ppc\Ppc821\Ce\Debug 16-Jul-2003 21:41                     37,970  Corelibc.lib 16-Jul-2003 21:41                     36,864  Corelibc.pdb

Path: Qfe37\Public\Common\Sdk\Lib\Ppc\Ppc821\Ce\Retail 16-Jul-2003 21:38                     38,496  Corelibc.lib 16-Jul-2003 21:38                     36,864  Corelibc.pdb

Path: Qfe37\Public\Common\Sdk\Lib\Shx\Sh3\Ce\Debug 16-Jul-2003 21:05                     28,804  Corelibc.lib 16-Jul-2003 21:05                     36,864  Corelibc.pdb

Path: Qfe37\Public\Common\Sdk\Lib\Shx\Sh3\Ce\Retail 16-Jul-2003 21:04                     30,384  Corelibc.lib 16-Jul-2003 21:04                     36,864  Corelibc.pdb

Path: Qfe37\Public\Common\Sdk\Lib\Shx\Sh4\Ce\Debug 16-Jul-2003 21:12                     28,656  Corelibc.lib 16-Jul-2003 21:12                     36,864  Corelibc.pdb

Path: Qfe37\Public\Common\Sdk\Lib\Shx\Sh4\Ce\Retail 16-Jul-2003 21:09                     30,234  Corelibc.lib 16-Jul-2003 21:09                     36,864  Corelibc.pdb

Path: Qfe37\Public\Common\Sdk\Lib\Thumb\Arm720\Ce\Debug 16-Jul-2003 21:53                     36,508  Corelibc.lib 16-Jul-2003 21:53                     36,864  Corelibc.pdb

Path: Qfe37\Public\Common\Sdk\Lib\Thumb\Arm720\Ce\Retail 16-Jul-2003 21:54                     37,332  Corelibc.lib 16-Jul-2003 21:54                     36,864  Corelibc.pdb

Path: Qfe37\Public\Common\Sdk\Lib\X86\I486\Ce\Debug 16-Jul-2003 20:59                     33,486  Corelibc.lib 16-Jul-2003 20:59                     36,864  Corelibc.pdb

Path: Qfe37\Public\Common\Sdk\Lib\X86\I486\Ce\Retail 16-Jul-2003 20:58                     35,256  Corelibc.lib 16-Jul-2003 20:58                     36,864  Corelibc.pdb



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.



MORE INFORMATION
Microsoft recommends the following:
 * After you apply this fix, export the platform SDK.
 * Re-link with the updated platform SDK any DLL modules that leak when repeatedly loaded and unloaded.
 * If you (the developer) have an application that is built by using the OEM's platform SDK that has these symptoms, obtain the updated platform SDK from the OEM directly (not from Microsoft), and then relink your application.

Keywords: kbbug kbfix kbqfe KB822479

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.