Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Destroy fires twice
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01450229
Message ID:
01450270
Vues:
73
>
PROC main_job
>private poLog
>poLog = NULL
>main_job2()
>poLog = NULL                     && <== here the Destroy() fires again
>RETURN
>
>PROC main_job2
>     poLog = someobject()
>     RETURN                     && <== here the Destroy() fires first
>
Peter,

Not directly related to your problem, but you do not need to use a private variable in this case at all (if you ever need...) your code will be better, IMO if you were just using local variables.
PROC main_job
local loLog
loLog = main_job2()
RETURN

PROC main_job2
     local loLog
     loLog = someobject()
     RETURN loLog
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform