Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trying to track down memory leak(s)
Message
De
23/09/2011 13:35:24
 
 
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:
01524518
Vues:
84
>>>>>Do you think this particular method can be a source of the error?
>>>>>
>>>>>The external application calls this dll with the 'Invoke' call passing an XML string with parameters. Then invoke method parses the string, calls appropriate method of the class and returns back usually an xml string or a string.
>>>>>
>>>>>UPDATE. With commented MySQLExec the first call of GetItem method takes 0.02 sec. and last call takes 0.14 seconds, so there is still a memory leak.
>>>>
>>>>
>>>>(1) try releasing lcSource as well
>>>>(2) If the method does not change tcSource, pass it by reference - but do not release it here
>>>>(3) You have multiple exit points (release )
>>>>
>>>>(4) I do not think that the difference between .14 sec and 0.02 sec is an indicator of a memory leak
>>>
>>>Making a switch from passing parameter by value to by reference didn't help. I see the exact same thing - 0.03 to 0.14
>>
>>
>>This was just to avoid the copy of tcSource on the stack. Passing by value copies the contents of a variable. If the variable is a 16MB string, you end up with 32 MB for the duration fo the call
>
>The string is never that big. It is usually rather small - just a few parameters embedded in the string. For MySQLExec the strings are also not too big - but I changed to pass them by reference as well.
>
>If you'd like, I can send you the latest log file. I can increase verbosity level (I was using the smallest one to only record main info).


I'm out of ideas - with hindsight I can say I didn't have any in the first place
Gregory
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform