The information in this article applies to:
SYMPTOMSAfter creating an OLE object using the CREATEOBEJCT() function, releasing that object does not remove the OLE application session from memory. RESOLUTIONFor Visual FoxPro to remove certain OLE application session objects from memory, the OLE application must be terminated. For example, after running the following code, three instances of Microsoft Excel remain in memory:
To end each Microsoft Excel session before reentering the FOR loop, the
Microsoft Excel session must first be terminated. For example:
In this example, Microsoft Excel is told to quit, and then the code
releases the memory variable in Visual FoxPro by using the oObject.Release
command. Quit is a method that Microsoft Excel recognizes and can act upon,
the actual method for your OLE automation application may differ.
STATUSThis behavior is by design. MORE INFORMATION
The OLE Automation release method is program specific. In the previous
example, Microsoft Excel was used. Microsoft Excel version 7.0 is designed
to remain in memory after a OLE object is released. However, other programs
may behave differently. For example, Microsoft Word version 7.0 terminates
with just a RELEASE command.
Steps to Reproduce Behavior
Additional query words: VfoxWin kbvfp300 kbvfp500 kbvfp500a kbvfp600
Keywords : |
Last Reviewed: May 27, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |