BUG: Memory Problems with Simple MapiLast reviewed: July 25, 1997Article ID: Q169680 |
The information in this article applies to:
SYMPTOMSWhen writing an application that uses simple MAPI you may encounter Memory leaks.
CAUSERepeated calls to MAPILogoff() within the same application may result in a significant memory leaks. An example would be if a programmer designed an application that needed to periodically poll for new messages. A poorly optimized algorithm would appear like this:
Do Until Something MAPILogon() MAPIResolveName() MAPIFindNext() MAPIFreeBuffer() MAPILogoff() Sleep() Loop RESOLUTIONInstead you should Cache the MAPI Session, changing the example to this:
MAPILogon() MAPIResolveName() Do Until Something MAPIFindNext() Sleep() Loop MAPILogoff()You could also use Extended MAPI to avoid this problem.
Keywords : SMapiCMC Version : 4.0 5.0 Platform : IDEAS WINDOWS Issue type : kbbug Solution Type : kbfix |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |