General information
Category:
Coding, syntax & commands
>>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only