Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Forms not releasing themselves or their datasessions
Message
De
26/06/1997 19:20:17
Jon Ziegler
Mannesmann Dematic Corp.
Solon, Ohio, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00036724
Message ID:
00037883
Vues:
56
>>>>>>I am experiencing some extremely frustrating problems in VFP 3.0b. Randomly, forms that I have created within an application will not close...
>>
>>>>>I'm using Vfp 5.0a here and I'm also facing this problem. What is worse is that it really seems to be randomic (I have never seen such a problem before)...
>>
>>>It really looks like there are some object references that are still pointing to your object. For this reason, objects remain in memory, but you can usus\ally not talk to them anymore. In VFP3, a construction like this often leads to GPFs too. If that might be the case, then I can give you more advise how to deal with that...
>>>
>>>Greetings
>>>Markus
>>>MS MVP
>>
>>Yes, I have gotten quite a few GPFs. I recently added a simple ON SHUTDOWN program which does a RELEASE ALL and a CLEAR ALL and the stubborn forms do indeed close in the .EXE file running on it's own (as opposed to running from within the VFP command window) and I can shutdown my application without using CTRL+ALT+DEL and "End Task". Is there an easy way to obtain all object references? I've done a DISP MEMO TO , but can't seem to find the needed item to RELEASE.
>>
>>I can't remember the exact details of the GPF messages, but can obtain them if it could be of help in a possible solution to this problem (and you're willing to help a struggling FoxPro programmer, of course).
>
>There is no easy way to get rid of all object references. As long as you only use variables as pointers, try to make them local so that they go out of scope. Also, a XXX.Release should clean up all the variable references. But it gets more tricky as soon as you use properties as references, because then you can not assume that XXX.Release cleans up everything.
>
>As a general rule, make sure to clean up all your references by yourself. I know it's a PITA, but...

If I encounter the problem from within VFP (not running from the .EXE alone) and I cancel from a menu item which I have setup to do just that, I can enter "CLEAR ALL" in the command window, and that will clear the previously unreleasable form off the screen. If I would just enter "RELEASE ALL" instead of "CLEAR ALL", the form would still be on the screen. I'm trying to figure out what to clear! Still haven't gotten it yet. I've tried all of the "CLEAR " commands alone (aside from "CLEAR ALL") and none of them by themselves seem to make the form disappear. I've also noticed that if I create a form based on the first subclass of my main form baseclass, the problem appears even when the form is completely blank with no tables in the dataenvironment whatsoever and absolutely no controls are on the form. If I were to click the "X" close button of the form, it would not release. So, I think for some reason my form class is to blame. I'm still debugging...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform