Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Class Questions
Message
From
22/01/1999 18:23:50
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Miscellaneous
Thread ID:
00177951
Message ID:
00179286
Views:
36
>>In this example you have only one property, which is different in any subclass of the initial class. The whole chain is loaded, and all the definitions are here. What I'm supposing, is that if there was some Prop2, which was redefined only at B and D level, and overrriden in the object itself, wouldn't use any space in C level, and if it wasn't redefined in object x, wouldn't have space allocated in that object either. Is there a way to measure this?
>
>Wouldn't ALL object have to have the space allocated for the properties, since they could change the value after it's instanciated? The non-default properties would only be initialized with the inherited value, but they would still be separate from the base class properties. Changing any one of the objects other properties would effect only that object, so they must have separate space allocated for each object's properties.

I'm just wandering when is that space allocated? At instantiation time, or at the time when a property gets a non-default value? What does the .ResetToDefault do - just blank the value or remove the property? Does VFP look for blank (or .null.) values, or for missing values, to decide to look up the inheritance tree? Knowing Fox's habit of moving variables around all the time (did we ever have an address of anything except functions in a .fll?), I'd rather guess it (de)allocates the space dynamically, i.e. as needed. Some objects have so many properties, which rarely decline from default, that repeating empty space for each of them in every instance (imagine an array of combos) would be a gross waste. I think I'll do some measuring myself first, and then come back with more WAGs :)

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform