AFIAK, VFP doesn't have a function to return the exact memory used by an object. The variable "o" only contains a pointer to a class. That class can be instanciated as a VCX (inside VFP) or as a COM (outside VFP).
As a rule of thumb, you use a variable locally for a method or procedure and use a class property for access in multiple class or module.
HTH
>I have come to learn that when I create an object using
>o=CREATEOBJECT('xxx.xx') and display memory, it shows 1 variable defined and 0 bytes used whereas when I actally declare a variable by o="string", it shows 1 variable defined and n bytes used. I do not know how the object exists without using any memory. Can anyone explain a bit about this? This atleast means to me that accessing object variables are better than using other declared variables.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement