Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trying to track down memory leak(s)
Message
 
 
À
26/09/2011 17:14:40
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:
01524767
Vues:
91
>>>Basic need for logging is the put the info into a file as fast as possible without any other intrusion.
>
>< snip>
>
>>I should be able to read and modify and delete log file while the process is running from Windows Explorer. With strtofile I can do that, with other suggested approaches I can not.
>>
>>I reverted to original code and only implemented write_log changes. So far so good although 1000 haven't finished yet and the log file is already 12 MB.
>
>Thomas hit the nail on the head - you want a low-overhead logging process that writes a separate file to disk. The idea is to have a useful log file that survives even if your program crashes.
>
>In the past I've had to fix schemes where log entries were written to a variable or property, the idea being to write it to disk at the end of processing. When the program errors or crashes, the variable/property is lost.
>
>Although my log files rarely exceed a few Kbytes, I've had success using SET ALTERNATE TO filename ADDITIVE / SET ALTERNATE ON, then writing to the file with ?/??.

The current code does that already. The main problem was not resetting this property to space(0). I did identity that incrementing this property was the main problem, but didn't make one logical step of comparing with other EZ programs and finding that they do reset this property in every invoke call.
So, the problem was indeed there. I guess the only change that needs to be done is to add this line to the main program and all will work fine. Of course, I made lots of other little tweaks which my colleagues seem to want to not implement for now.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform