Functions may leak memory if an exception is thrown by the COM object when you use #import to generate wrapper classes for COM objects (231872)
The information in this article applies to:
- Microsoft Visual C++, 32-bit Enterprise Edition 5.0
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
This article was previously published under Q231872 SYMPTOMS
When using #import to generate wrapper classes for COM objects, _com_dispatch_method(), _com_dispatch_raw_method(), _com_dispatch_propput(), _com_dispatch_raw_propput(), _com_dispatch_propget(), and _com_dispatch_raw_propget() function calls may be generated.
These functions leak memory if an exception is thrown by the COM object. Specifically, ICreateErrorInfo is not released and three BSTRs are not freed.
CAUSE
This is due to a bug in the internal implementation of the compiler native COM support.
RESOLUTION
A supported fix that corrects this problem is now available from Microsoft.
To resolve this problem immediately, contact Microsoft Product Support Services to obtain the fix. For a complete list of Microsoft Product Support Services phone numbers and information on support costs, please go to the following address on the World Wide Web:
http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS
The English version of this fix should have the following file attributes or later:
Date Time Size File Name Version# Platform
-------------------------------------------------------------------
06/04/1999 11:14PM 184KB COMSUPP.LIB N/A (x86)
08/05/2000 01:55PM 198KB COMSUPP.LIB N/A (alpha)
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.REFERENCES
For more information about Visual Studio service packs, click the following article number to view the article in the Microsoft Knowledge Base:
194022
Visual Studio 6.0 service packs, what, where, why
194295 How to determine whether a Visual Studio service pack is installed
Modification Type: | Minor | Last Reviewed: | 9/23/2005 |
---|
Keywords: | kbHotfixServer kbQFE kbActiveX kbProgramming kbQFE kbBug kbfix kbLangCPP kbSmartPtr kbVS600sp4fix kbVS600sp5fix KB231872 |
---|
|