>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.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao