Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
When or Where form's private datasession is released?
Message
 
À
26/07/2007 10:09:27
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01243755
Message ID:
01244027
Vues:
20
Hi Juan,

>I'm running a form which uses a private datasession, but after releasing the form I still can see its datasession by issuing the SET command.

There are two reasons for a datasession that is not disappearing. One reason is there's still a transaction running. TXNLVL() returns a value greater than 0 in this case. The other reason is that there's still an object around in memory that has been created in this data session. This object might be a dangling one, that is, there's no reference left to the object.

Checking for a transaction is easy. Checking for objects can be a bit daunting. First of all, you should review the code for any obvious CreateObject, AddObject and NewObject lines. If that doesn't help, you could insert a line into every Destroy event and log this. A dangling object doesn't fire a destroy event, so the object should be missing from the log. This works only objects that are on the form at design time, though. For dynamically created objects you either need to add the code to the base class. Or, you create a copy of the form and start removing code from events and objects from the form until the unknown data session is gone.
--
Christof
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform