Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CreateObject() and NULL
Message
 
 
À
16/02/2000 00:27:52
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00332539
Message ID:
00332905
Vues:
16
I guess I made a poor choice of words.

Where I have encountered this error before (and it was a monster of my own making) was when I used an array property to track controls on a form that made up a menu. I couldn't use the system menu because this was a light pen/touch screen system. When I didn't Release or .NULL. set the array elements before I used that variable again, I would get a C000005 error after 2 or 3 cycles through the menu.

This was before SP3 so I don't know if that would have corrected the problem. However, when I went through the array and explicitly released the objects contained in the references before reusing them, everything worked okay.

This may be a very esoteric example but it forced me to evaluate how I was programming something. Because I don't know C++ that well (minimal), I don't know how VFP internally handles memory when I don't tell it what to do. So now I tell it to explicitly release things. It doesn't hurt anything, and I'm confident it has saved me on a number of occasions.

>You've introduced a misunderstanding here, IMO.

>This technique alleviates VFP GPFing. Unresolved object references will cause this type of error.

>It is not "unresolved object references," but, rather, dangling object >references. The dangling object references are *only* created as Erik says:

>>This is only necessary when assigning the object's reference to the property of another object.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform