Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Arrays of objects - releasing one element
Message
From
01/05/2002 16:25:52
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
30/04/2002 17:54:59
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00651134
Message ID:
00651576
Views:
17
>Also, is it possible to save an object to disk and reload it automatically without having to do heaps of fancy coding to determine the contents of the object???

For this part, you may check Rick Strahl's wwIPStuff (or whichever part thereof contains this method), where there's a pair of methods called Obj2Xml and Xml2Obj - you can practically save the state of an object into a XML file, and later restore from there. You get some overhead: you still have to instantiate the object - or you can choose to recycle unused objects and restore their states from the XML files. In the latter scenario, you would not release an object, but rather mark it as unused (have a .lUnused property there), and when you need a new object, locate the first one in your array which is unused, set its properties afresh (if it's a completely new one), or restore from XML (if someone returned and you need to restore his object).

back to same old

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

Click here to load this message in the networking platform