Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How does VFP load class methods into memory?
Message
De
16/11/2009 23:20:21
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01434853
Message ID:
01435133
Vues:
36
>>>>It goes without saying that (1) only the class definition is kept in memory (2) the object properties are not shared. Properties have to be initialized each time
>>>
>>>I agree. I thought so too as property values are different (or could be different) for all instances of the class.
>>
>>But then it's only properties with nondefault values. The rest are looked up in the class definition (or parent class, if at default) when needed.
>>
>>(Of course, I do not really know this; I think I read it somewhere once upon a time, or more than once,but can't remember where)
>
>Good point. BTW, if the properties are left as default, are they read each time or only once?

I'm not sure what "read" would mean in this case. The properties exist as such in the runtime definition of base classes; anything derived from it gets the added or changed properties loaded into memory as soon as there's one object of that class - and the object's changed properties must as well. So whatever isn't changed shouldn't be stored in memory n times - or else, well, guess what: look into your executable and count how many times do you have the word "Arial" in it. With a few forms with a 100-200 objects each, the count should be in the hundreds. Then count how many times you have the word in all forms and classes in the project (in properties memo and wherever it is in the special records in the end of each class where the fonts are listed). The first number should be somewhat larger than the second - because the vcx and scx files are included in the exe as they are. And font names are listed only on objects where non-default ones are used.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform