Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Determining Object References and Closing
Message
 
 
À
03/10/2001 08:40:51
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00563520
Message ID:
00563553
Vues:
26
This message has been marked as a message which has helped to the initial question of the thread.
>I'm trying to tighten-up a couple applications and want to know if there is a way to cycle through all the existing object references so they can be set to NULL before shutdown? Thanks!
>
>Regards, Renoir

You might try looking at the AINSTANCES() function. It will give you an array filled with variable names that have references to the specified object. You could then loop through the array and set eacj variable to .NULL..

Another approach is to add a Release method (if one doesn't already exist) to your objects with the following code:

release THIS

The usual course is to set variables to .NULL.. When the last reference to the object is set to .NULL., the object's Destroy method fires. Calling Release will release the object firing its Destroy method immediately. All references to the object will automatically be set to .NULL. because the variable will no longer exist.

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