Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Releasing COM DLL in VFP 6.0
Message
From
30/07/1998 13:48:40
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Releasing COM DLL in VFP 6.0
Miscellaneous
Thread ID:
00122767
Message ID:
00122767
Views:
60
I have DLL class library compiled under VFP 6.0 prototype release. Executing application under VFP 6.0 I ran into weird problem of releasing DLL from the memory. The code looks like that

* instantiate the the only OLE PUBLIC class from DLL
oApp = CREATEOBJECT("MyDLL.OlePublicClass")
* get business rules object from DLL(not OLE public class)
* method returns reference to the object created in the DLL's
* memory space by ADDOBJECT method
oBusObj = oApp.getBusinessObject("ObjectName")
*
* executes some manupulation
*
* request different business object
oBusObj = oApp.getBusinessObject("ObjectName2")
* finish execution of the code - release DLL
oApp = null
rele oApp

This code executed under VFP 5.0 and VB has been releasing the DLL without any problem.
But if I run this program under VFP 6.0, the DLL does not get released from memory, even Destroy methods of all objects in DLL have been called(I record every object destroy method execution in the file for debug purposes). The thing I've found is if I RELEASE oBusObj before assigning different object's reference to it or assigning second business object reference to a different variable, makes the releasing of the DLL working correctly.

Does anybody ran into the same problem? Is the any reasonable work around it?

Thanks.
Dmitriy Zaslavskiy
Reply
Map
View

Click here to load this message in the networking platform