Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Like generating a VFP C0005 error. BUG ?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00824767
Message ID:
00824809
Vues:
24
It seems that release command is not enough ( I don't know why it seems that it should). If you insert X2=.NULL. VFP did not crush.

PUBLIC X2
X2=CREATEOBJECT('pippo')
X2=.NULL. && inserted line
RELEASE X2
....




>Hi,
>
>If you want put VFP on memvar inconsistent status,
>run this, and IGNORE errors.
>
>
>PUBLIC X2
>X2=CREATEOBJECT('pippo')
>RELEASE X2
>* now X2 have on internal array memvars name and pointer defined, but heap storage is released, and internal vartype char is bad.
>
>* x3 for compare error trpping
>? TYPE('M.X3')		&& OK, U
>? VARTYPE(M.X3)		&& OK, U
>? VARTYPE(M.X3,.T.)	&& BUG, Variable not found
>=m.X3  			&& OK,  Variable not found
>? m.X3			&& OK,  Variable not found
>
>* if you use x2:
>
>? TYPE('M.X2')		&& ??? U
>? VARTYPE(M.X2)		&& ??? Data Type Mismatch
>? VARTYPE(M.X2,1)	&& ??? Data Type Mismatch
>=m.X2  			&& ??? Data Type Mismatch
>? m.X2 			&& Print fire a strong C0005 error.
>
>DEFINE CLASS pippo as Custom
> PROCEDURE init
>   RETURN
> ENDPROC
>
> PROCEDURE Destroy
>   * now X2 not exists
>	PUBLIC X2
>   * now X2 is correct
>        ? 'var x2 = ', m.X2
> ENDPROC
>
>ENDDEFINE
>
>
>then VFP RELEASE memvar is not correct
>
>Fabio
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform