Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Memory objects saved into cursors
Message
From
20/02/2019 00:26:30
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
 
To
19/02/2019 21:51:08
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01666501
Message ID:
01666574
Views:
55
>>>>>>A reference to a pointer still points to the same object.
>>>>>
>>>>>Yes. That's what I want. I want a reference to the existing object, so that the object exists, and the reference points to the object that exists as well.
>>>>>
>>>>>It's as the second example was setup in my code above. I'm effectively using that method presently, and it works, but it's clunky. I would like to have a way to store a binary object which is the explicit reference to the existing object, so I could reference it without having to use an intermediate variable name which is then set to the object reference itself. I'd like to remove that "middle man" if possible.
>>>>
>>>>My dear, I fear this is not possible with VFP. Remember, this is a dinosaur. Even if you figure out the adress of an object. Run time generated stuff like objects and there props might be mixed with vars.(Create a var, create an object, an other var and then a property to the object. The storage of the object must be fragmented somehow.) Stuff you can not store binary like references to other objects
>>>
>>>I wonder if that would be possible, to pass the object by reference to a DLL which obtains the address, and returns it as a value, allowing the value to be saved as an integer, and then reconstituted similarly by calling a DLL with the value, which updates another variable passed by reference to then refer to that object?
>>>
>>>Hmmm....
>>
>>Why not. The structure of a vfp object and the vars must be somehow declared. I hate to say it, but the only person I can imagine that might understand it know is Chen ... The original developers, but that's old knowledge.
>
>As vfp is garbage collected with a schema to move/compact memory to get large uninterrupted areas, the whole discussion is somewhat pointless. You have "handles" in vfp, which could be seen as smart pointers, which are informed/updated when the base adress pointed to is moved. Either to some kind of serialization (JSON, XML, stream) or add a searchable structure of handles (or object paths to eval/getpem)

Can you give me a source? Now I'm curious.
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform