Microsoft KB Archive/153915

{|
 * width="100%"|

PRB: Memory Leak in 32-bit DDEML
'Article ID: Q153915

Creation Date: 24-JUL-1996

Revision Date: 18-OCT-1996' The information in this article applies to:

  Microsoft Win32 Application Programming Interface included with: - Microsoft Windows NT, version 3.51 SYMPTOMS

There is a small memory leak associated with calling the 32-bit DDEML function pair DdeCreateDataHandle / DdeFreeDataHandle. This leak is minor, and is noticeable only after hundreds of calls to these functions. Most applications that use 32-bit DDEML should not be affected by this leak. However, if DdeCreateDataHandle / DdeFreeDataHandle is called enough times, this leak will eventually exhaust the application's working set and cause further calls to DdeCreateDataHandle to fail. RESOLUTION

The solution to this problem is to use messaging DDE instead of DDEML. For documentation on how to do this, see the Overview: Dynamic Data Exchange in the Win 32 Software Development Kit Help file. STATUS

This problem has been fixed in Windows NT 4.0. MORE INFORMATION

This leak can be best viewed with PERFMON.EXE, a performance monitoring utility that ships with Windows NT. To see the leak, do the following:  Launch PERFMON.EXE. (This utility can be found in the Administrative Tools Group in Program Manager.) From the Edit menu, select Add To Chart. In the Add to Chart dialog, select Process from the Object drop-down menu. In the Counter listbox, select Private Bytes. In the Instance listbox, select the name of the application that is using DDEML. Click the Add button, followed by "done." At this point, Performance monitor will display a line depicting the memory usage of the selected application. This line should remain flat indefinitely, but because there is a leak, it will grow over time. Because the leak is so small, it may be imperceptible in most applications. </li></ul>
 * }

-

"THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED 'AS IS' WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY." '' ©1997 Microsoft Corporation. All rights reserved. Legal Notices.

''

Additional reference words: 3.51

KBCategory: kbprg kbprb

KBSubcategory: UsrDde