Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dangling Reference..
Message
 
À
15/02/2001 10:57:35
Sony Joseph
Dovenmuehle Mortgage Inc
Schaumburg, Illinois, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00476296
Message ID:
00476354
Vues:
31
>Hi,
>
>I have a commandbutton with this code in its Click Method
>
>Do with Thisform
>
>
>And in 's Init
>Lpara toForm
>Thisform.oCallingform=toForm
>
>In its Close Commandbutton
>If VarType(Thisform.oCallingForm)="O" Or !Isnull(Thisform.oCallingForm)
> Thisform.oCallingForm=.NULL.
>Endif
>Thisform.Release
>
>Does this clear the Reference? Some Systems freeze after a number of calls from the main form.
>
>Anyone has a clue?
>
>
>TIA

That should clear the reference, but I think you can simplify your code by using just

Thisform.oCallingForm=.NULL.
Thisform.Release

unconditionally, because you have to reset oCallingForm property to NULL anyway before closing the form.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform