PRB: Memory Leak in Active Messaging v1.1 Folder Handling Proces

ID: Q171427


The information in this article applies to:
  • Collaboration Data Objects (CDO), versions 1.1, 1.21


SYMPTOMS

There is a reproducible 4k memory leak in the Active Messaging version 1.1 folder handling process.


RESOLUTION

The only available workaround at this time is to periodically shutdown the process that is slowly consuming available memory.


STATUS

Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


MORE INFORMATION

Steps to Reproduce the Behavior

The following code sample from a Visual Basic 5 Form will reproduce this leak. The leak can be monitored in the Windows NT Performance Monitor, or in the Windows NT Task Manager.

   Private Sub Command1_Click()
      For i = 1 To 200 Step 1
         'Update counter on form to show progress
         Text1.Text = i
         Text1.Refresh

         'Dim objects, then create and logon to session
         Dim objSession As Object
         Dim objMsg As Object
         Set objSession = CreateObject("MAPI.Session")
         objSession.Logon "MyProfileName", "", False

         'With the following line commented leak does not occur
         Set objMsg = objSession.Inbox.Messages.GetFirst

         'Cleanup and logoff
         Set objMsg = Nothing
         objSession.Logoff
         Set objSession = Nothing
      Next i

   End Sub

   Private Sub Command2_Click()
      Unload Me
   End Sub 
To monitor this in the Performance Monitor:
  1. Place the earlier code in a Visual Basic 5 form with two command buttons and a text box, then run the form.


  2. Click + in the toolbar.


  3. In the Object dropdown, select "Process."


  4. In the Instance list box, select Visual Basic.


  5. In the Counter list box, select "Private Bytes" then select Add..


  6. In the Counter list box, select "Virtual Bytes" then choose Add again.


Over a period of time you will be able to note that while Private Bytes is remaining relatively stable, the Virtual Bytes will be on a slow but steady increase until the system has no available memory left to provide to the process.

The only way to recover the lost memory is to shutdown the process.


REFERENCES

For additional information about Collaboration Data Objects versus Active Messaging, please see the following article in the Microsoft Knowledge Base:

Q176916 INFO: Active Messaging and Collaboration Data Objects (CDO)

Additional query words:

Keywords : kbcode kbActMsg kbCDO110 kbCDO121 kbGrpMsg kbDSupport
Version : WINDOWS:1.1,1.21
Platform : WINDOWS
Issue type : kbprb


Last Reviewed: October 14, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.