Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trying to track down memory leak(s)
Message
De
23/09/2011 11:27:19
 
 
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:
01524499
Vues:
101
>>>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
>
>I applied your suggestions 1-3 - testing now. To me gradual increase from 0.02 to 0.14 (with MySQLExec calls commented out) is a clear indication of a memory leak. Any more ideas of restoring memory?


I just did a test
The memory allocation is OK, goes up and down

So, sorry - false alarm - for your case
function Do_it()
	
	do while true
		=allocate()
	enddo
endfunc

function allocate()
	local aa
	
	aa = space(8*1024*1024)
endfunc
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform