PRB: Memory Leak When Traversing OLE DB Rowset (190960)
The information in this article applies to:
- Microsoft Visual Studio, Enterprise Edition 6.0
- Microsoft Visual C++, 32-bit Professional Edition 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
This article was previously published under Q190960 SYMPTOMS
When you use the OLE DB Consumer template classes, columns that are mapped
to BSTRs or interfaces leak memory (for example, IUnknown or
ISequentialStream). The leak occurs after each move through the rowset.
CAUSE
The OLE DB Consumer templates do not free BSTRs, VARIANTs, interfaces, or
chapters that are retrieved after moving to a record.
RESOLUTION
You must explicitly call CAccessorRowset::FreeRecordMemory() to free the
BSTRs, VARIANTs, interfaces, or chapters allocated for each record. Call
FreeRecordMemory() before moving to the next record.
STATUS
This behavior is by design.
REFERENCES
Visual C++ version 6.0: CAccessorRowset::FreeRecordMemory();
Modification Type: | Minor | Last Reviewed: | 8/12/2005 |
---|
Keywords: | kbprb kbtemplate KB190960 |
---|
|