Microsoft KB Archive/826230

= BUG: A COMTI output-only recordset may cause a memory leak =

Article ID: 826230

Article Last Modified on 12/4/2007

-

APPLIES TO


 * Microsoft Host Integration Server 2004 Standard Edition
 * Microsoft Host Integration Server 2000 Service Pack 1
 * Microsoft Host Integration Server 2000 Standard Edition

-





SYMPTOMS
The Dllhost process that contains one or more COM Transaction Integrator (COMTI) components will leak memory if one or more recordsets are designated as output-only parameters and have been initialized to anything other than a null value before the COMTI method call is executed. To view this behavior, monitor the memory usage of the COMTI process by using Performance Monitor or Microsoft Windows Task Manager.



CAUSE
Microsoft Component Object Model (COM) rules state that COMTI must not destroy a pointer that comes in for an output-only parameter. Therefore, when the output-only recordset is passed with a valid pointer, a memory leak occurs because that memory area is orphaned when the COMTI runtime passes back a new pointer with the valid output data.



RESOLUTION
This problem can be corrected by using correct coding techniques. For more information, see the &quot;More Information&quot; section.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.



MORE INFORMATION
Correct coding techniques prevent this problem. When you use Microsoft Visual Basic or Microsoft Visual Basic Script, the output-only recordset variable must be initialized to Nothing before you make the COMTI method call. When you use other COM-aware programming languages, you must initialize the recordset variable to a null value (x00) by using the appropriate coding techniques for that language.

Keywords: kbbug kbnofix KB826230

-

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

© Microsoft Corporation. All rights reserved.