Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trying to track down memory leak(s)
Message
De
26/09/2011 16:08:13
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01398453
Message ID:
01524763
Vues:
101
>>You heard not only from Greg that StringToFile is suboptimal.
>>
>>>BTW, unless I did something wrong my tests are opposite:
>>
>>There is no reason to open and close in the loop if you use a special logging class.
>
>But in order to write into the file don't we need to open with exclusive access? I don't think strtofile keeps an exclusive access on the file.

Basic need for logging is the put the info into a file as fast as possible without any other intrusion.
From this it follows that your timing example is faulty for the base pattern.

If you have the need to read this info *while* the process is running, this should be handled by a subclass
or any other means implementing the different strategy.needed here.

If you want to the log to show info from different processes, IMHO this calls for another subclass logging into a table -
the mechansism for multi-user is defined, you can easyly add the needed process info and query for distinct process via SQL:

As much of the needed functionality is similar,
several minimally different classes are IMHO the best "grouping" for such functionality in vfp -
in python it might be a module with one class picking the strategy to be monkeypatched -
such a way of coding in vfp would be similar to binding some event methods to empty (quasy-interface) class.methods,
which does not really make for clean and easy to follow code.

regards

thomas
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform