FIX: Multi-Use OLE .Exe File Not Releasing Memory
Article ID: 176777
Article Last Modified on 3/10/2005
APPLIES TO
- Microsoft Visual FoxPro 5.0 Standard Edition
- Microsoft Visual FoxPro 5.0a
This article was previously published under Q176777
SYMPTOMS
When you use a multi-use OLE out-of-process server (.exe), memory is
not released in the process until all of the objects have been released.
RESOLUTION
When an OLE .exe file is going to be used for long periods of time without
the release of the last object you can use the following workaround:
- Build two OLE .exe files with different GUIDs and place them on the
computer.
NOTE: To generate a different GUID for the second instance of the OLE .exe, select the "Regenerate OLE Server Ids" option when you build the
Visual FoxPro project.
- In the client, have a procedure that runs before instantiating the
object that checks the current system date and time.
- When you switch from one server to the other, you release all instances
of the OLE server you are switching from. Perform this switch at regular
increments to minimize the effect of the OLE server holding the memory.
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article.
This bug was corrected in Visual FoxPro 6.0.
Additional query words: COM DCOM
Keywords: kbbug kbfix KB176777