Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating objects drain memory
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00085047
Message ID:
00087052
Vues:
40
>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!
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform