Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Class Questions
Message
From
24/01/1999 16:19:25
 
 
To
24/01/1999 06:01:33
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Miscellaneous
Thread ID:
00177951
Message ID:
00179622
Views:
33
>>>Fred,
>>>
>>>Yes, each object in memory has it's own space for it's current property values. I was pointing out in the first message that each class definition has it's version of each property in memory too.
>>
>>That's the way I read it from your message. Dragan seemed to be of a differing opinion, though.
>
>I'm just guessing which properties does it reserve the space for: all of them, or just non-default. If it's all, it may be a waste of space; if it's just non-default, it requires lots of moving around when they change values. But then, maybe the truth is in the middle - a property of an object may have just a pointer to somewhere. It may point to a parent class's property or .null. if it has a default value, or to its own value if it has a proprietary value. We may well imagine that the memory space taken by one object is contiguous, but that may not be the case. Fox has always played mumbo-jumbo with memory, and we never cared because it worked. An object's memory block may be just an array of pointers, and the actual values of the properties may be anywhere.
>
>Take a look at the example in my other message in this thread, I think I got something.

Yes, I think you may be correct that an object really is just a block of pointers, not a contiguous memory thingie. That makes a whole lot of sense, when you think about it, because then it can just point back to the class definition for default values, and just change the pointer when it needs to be a unique value. There internally is probably some sort of flag on each property to indicate default vs unique to this object. Then again, that may never be necessary as it could all be handled at instanciation of the objects. Who really cares what the pointer is pointing to, default values or my own?
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform