Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Memory objects saved into cursors
Message
From
19/02/2019 08:55:15
 
 
To
19/02/2019 01:18:27
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01666501
Message ID:
01666536
Views:
55
>>I'm looking for a way to reference memory objects that are live in memory, instantiated, viable, able to be called, but to reference them later, not now, meaning in a few minutes while they are still live and viable.
>>
>>In C/C++ I would store a reference to the pointer in a memory structure, or save the memory address to a disk file and then reconstitute the pointer by decoding the address. I don't know of a way to do this in VFP, and I'm needing it. :-)
>
>In this case you could add those classes to a collection with a key and use the key to reference the objects. You could implement the collection as singleton.
>
>lcGuid = GenerateGuid()
>ObjectCollection.Register(lcGuid, loMyObject)
>INSERT INTO MyTable (ProcessID) Values (lcGuid)
>
>SCAN
> loObject = ObjectCollection.Get(MyTable.ProcessID)
> …
> RELEASE loObject
> ObjectCollection.Remove(MyTable.ProcessID)
>ENDSCAN
>
>Question is then, why you need a table in the first place, the collection itself could handle the storage and access logic.

The table conveys information about the operation taking place so the user can review and enable / disable it.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform