Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Form leaves behind reference
Message
 
À
30/06/1998 16:37:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00113140
Message ID:
00113625
Vues:
17
>I have a form with close button whose Click method is:
>THISFORM.Release
>
>The problem is that when I exit the form this way, it leaves its object in memory with a .NULL. value. The next time I run the form it does not instantiate its contained objects correctly. I am assuming that is becuase this leftover reference gets in the way. What code do I need to put where to eliminate the object variable when the form is closed?

This might be happening if you create an object as a property of the form or a property of a contained object on the form. Something like THISFORM.oWhatever = CREATEOBJECT("SomeClass") In this case, you should set THISFORM.oWhatever = NULL in the forms .Destroy() event.

Steve
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform