Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating objects drain memory
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00085047
Message ID:
00087052
Views:
39
>I see what you have now. Yu could go with one object that holds the four integers or you coudl stick with the four objects each holding a single pointer. But you do need to have that one or those four be able to open a link adn close the link without being destroyed. You can initially opne a link on creation by calling an OpenLink method from the Init. You should have a CloseLink method that can close the link. You can simplify the programmers interface by having the OpenLink method check to see if a link is already open and if so close that before openning the next one.

Yes, that is what I had to do. That is, I created one object upon startup and destroyed it when the program ends. I had an Open and Close method create and destroy the handle for an Organizer session, file, section, and record. Each integer handle is a protected property.

This eliminated the constant creating and destroying of objects. Now I have no more memory problems, and my program runs much quicker! :)

Thanks for everyone's help!
Previous
Reply
Map
View

Click here to load this message in the networking platform