Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Undestroyed objects in forms
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00086484
Message ID:
00086589
Vues:
34
>Jim,
>
>I'm using the 0402 build. I thought I had applied SP3 to it, but evidently not. Do you find this build to be more or less stable than the last? The developer at my client site has the 0415 build, and his application, and even VFP, crash several times during the day.
>
>You mention errant references to objects...can you elaborate a little on that point? I don't believe I'm referencing an object after it has been destroyed. The only times I've seen this is when the form doesn't unload because some of its objects are still around. Code in the form methods would try to reference objects within a container that no longer existed.
>
Ed,

I am referring to your code creating a variable or property that is an object reference to an existing object adn then not NULLing out that property or variable when the object is destroyed. IOW,
PUBLIC oForm
oForm = CReateObject("MyForm")
oForm.Release()
RETURN
The form created in the above code will not be released until you release or NULL the variable oForm. This is because the variable is referencing the object and when thr object attempts to release it self it cannot due to the external reference to it.

In the framework that I use each container hsa a property named oLastObj that holds a reference to the last object in it that had focus. If I do not do THIS.oLastObj = .NULL. in the destory of the container that referenced object will not be destroyed and therefore the container will not be destroyed and therefore ...........

That's what I an referring to.

As for the stability of VFP 5.0 build 415, I find it very stable as long as I don't leave object references around. When I have failed to celanup properly during the destuction process I build up references that eventually cause a GPF.

During development and debugging this happens to me regularly, but it has nopt occured in user code that is running. Of course the user don't do what I do, little things lie throwing VFP into an infinite loop and task ending to get out, or experimenting with sophisticated OO design patterns and getting things screwed up now and then.

I also have the habit of shutting down and restarting VFP about once every one or two hours just on principle. Also if I am debugging a problem actively I will restart more often just to be sure the bug I am tracking is not building up a mess on me.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform