Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Destroy fires twice
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01450229
Message ID:
01450270
Views:
72
>
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform