Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Releasing Objects
Message
From
30/10/2000 17:59:51
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Releasing Objects
Miscellaneous
Thread ID:
00436141
Message ID:
00436141
Views:
54
I created an out-of-process COM .EXE. This EXE immediately creates a reference to a COM .DLL and assigns the reference to a property of the EXE (e.g., THIS.MyDLL = CREATEOBJECT('MYDLLCLASS'). When I create a reference to the EXE either programmatically or from the VFP command window I want to have a reference to the EXE which then has a reference to the DLL. All this works fine until I try to release the EXE. In the command window the reference to the EXE no longer exists (VARTYPE() = "U") but the process persists in task manager. If I do not get a reference to the DLL in the EXE, there is no problem releasing the EXE. If I create an exposed method in the EXE that explicitly releases the DLL reference (THIS.MyDLL = .NULL.) and call it from the Command Window before releasing the EXE all works fine. If I put this same code into the Destroy Event of the EXE it will not release.

Am I nuts? Is this the way this is supposed to work?

Rick Grinter
Next
Reply
Map
View

Click here to load this message in the networking platform