Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
The DESTROY event -- clearing classes? from memory ?
Message
 
 
To
25/04/2002 14:25:06
Patrick O'Neil
American Specialty Information Services
Roanoke, Indiana, United States
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00649238
Message ID:
00649259
Views:
12
>QUESTION:
>
>The CLEAR's and the RELEASE's do _not_ cause the WordEvents "Destroy" event to fire (like i expected). However, when i use the QUIT command in the command window to exit VFP IDE, __THEN__ the WordEvents "Destroy" event fires (I have it display a debugging MESSAGEBOX).
>
>I want to avoid a accumulation of memory usage, and would like to programmatically get rid of whatever is activating the Destroy event.
>
>Could someone explain to me what is happening and how i can accomplish this sort of garbage collection / memory cleanup ?
>
>
>ADDITIONAL RELATED QUESTION:
>
>When I shut down windows (after running this program), i frequently get a message stating that a DDE process is still running. Is this some remnant of the instance of Word97 still running as an OLE server somewhere in memory ?
>
>
>many thanks for any help,

Using the "release myvar" syntax releases one reference to the object. Once all references have been released, the Destroy event fires. It seems that there are other references somewhere.

Instead of this technique, you can add a Release method. In the method, add the following code:
release THIS
This will explicitly release the object in memory and all references will be cleared. Call the method instead of releasing the variable.

HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Reply
Map
View

Click here to load this message in the networking platform