Article ID: 97136 - Last Review: January 8, 2003 - Revision: 1.1 BUG: OLE DataText Prop Doesn't Free Memory When Object ClosedThis article was previously published under Q97136 On This PageSYMPTOMS
An OLE destination (OLE client) control (OLECLIEN.VBX) can send data to
the OLE source (OLE server) application by setting the DataText
property, however the memory allocated for this data is not released
until OLECLIEN.VBX is unloaded. The memory is freed when you exit from
the application.
STATUS
Microsoft has confirmed this to be a bug in the Professional Edition of
Microsoft Visual Basic version 2.0 for Windows. We are researching this
problem and will post new information here in the Microsoft Knowledge Base
as it becomes available.
MORE INFORMATION
Each time an OLE destination object is created and the DataText property
is set, a new private segment is allocated by OLECLIEN.VBX. When working in
the VB.EXE interpreter environment, this segment is deallocated when you
exit from VB.EXE or when you start a new project (ALT+F+N). A Visual
Basic EXE program deallocates this segment when it is unloaded. The following code uses Microsoft Graph as the OLE source application, but the memory leak also occurs if OLECLIEN.VBX is used with other OLE source programs. To verify that the memory leak occurs, run the code listed below. Then load a tool like Heap Walker that ships with the Microsoft Windows Software Development Kit (SDK), and watch the number of private segments allocated to OLECLIENT change even after the code deletes the OLE objects. Steps to Reproduce Problem
| Article Translations
|
Back to the top
