Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
The DESTROY event -- clearing classes? from memory ?
Message
 
 
À
25/04/2002 14:25:06
Patrick O'Neil
American Specialty Information Services
Roanoke, Indiana, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00649238
Message ID:
00649259
Vues:
14
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform