BUG: A COMTI output-only recordset may cause a memory leak (826230)



The information in this article applies to:

  • Microsoft Host Integration Server 2004
  • Microsoft Host Integration Server 2000 SP1
  • Microsoft Host Integration Server 2000

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 "More Information" section.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" 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.

Modification Type:MajorLast Reviewed:3/22/2005
Keywords:kbnofix kbbug KB826230 kbAudDeveloper kbAudITPRO