Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Network:
Windows 2008 Server
>Hi Jay,
>
>I'd keep record references only constantly available if the cost of creating the object is high. That's the case with out-of-process servers, especially those that are regular applications like Word, Excel, etc. Classes such as the XML parser, however, are comparable light class that are quickly to instantiate. On my machine it takes like 50 ms to instantiate 1000 of these objects. Therefore I would create a new object whenever I need one and store in a local variable.
The original reason I moved it to _SCREEN was to avoid memory leaks. Someone (Craig maybe?) said that active x objects tended to have issues with that. What would be the best way to avoid that and still create them as needed? Would I create as needed, then set each property of the object to NULL, then set the object to NULL, then I'm good to recreate again? Could I just set the local variable (the object reference) to NULL before I create the next one? Just trying to understand this well so I don't keep running into the same issues.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement