Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Memory leak in VFP dll
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
Memory leak in VFP dll
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01524408
Message ID:
01524408
Vues:
142
Hi everybody,

We have a clear memory leak in our VFP dll. This is olepublic class that does some relatively simple stuff - I tested two base methods - GetItem and SubmitScan.

I run the following simple program to confirm it
oSEZ=createobject('tallyez40.basic_Tallying')
&&set step on
IF VARTYPE(oSez) = 'O'

* tested already
*oSEZ.SetVerbosityLevel(val(inputbox('VerbosityLevel to run at','VBL','0',5000)))
oSEZ.ClearLog()

LOCAL i
FOR i = 1 TO 300

TEXT TO lcInvoke noshow
<func>GetItem</func><tcunitid>TMAN03</tcunitid><tcOperator>LBAILO</tcOperator><tcReturnType>XM3</tcReturnType><tcScan>71</tcScan>
ENDTEXT
oSEZ.Invoke(m.lcInvoke)

TEXT TO lcInvoke noshow
<func>GetItem</func><tcunitid>TMAN03</tcunitid><tcOperator>LBAILO</tcOperator><tcReturnType>XM3</tcReturnType><tcScan>090897504217</tcScan>
ENDTEXT


oSEZ.Invoke(m.lcInvoke)

TEXT TO lcInvoke noshow
<func>SubmitScan</func><tcunitid>TMAN10</tcunitid><tcOperator>MATT</tcOperator><tnLocationID>16</tnLocationID>
<ttScanDateTime>9/15/11 10:26:18 AM</ttScanDateTime><tcScan>049000003710</tcScan>
<tcDptCatItm>RT37SUNDRI071FOOD   3556      </tcDptCatItm><tnInventID>0</tnInventID><tnQty>12</tnQty><tnStatus>0</tnStatus>
<tnBatchNo>2602</tnBatchNo><ttbatchdt>
ENDTEXT
oSEZ.Invoke(STRTRAN(m.lcInvoke,'TMAN10','TMAN' + transform(m.i)) + TRANSFORM(DATETIME()) + '</ttbatchdt>')
NEXT 
In the beginning the GetItem method takes

INVOKE GETITEM Turnaround: 0.16 basic_tallying.dopostinvokelogging:middleware_base.prg:1017

and at the end it took 2 seconds

INVOKE GETITEM Turnaround: 2.23 basic_tallying.dopostinvokelogging:middleware_base.prg:1017

-------------------
My question is - how to identify the exact place of the leak and what can I do to fix it?

I also going to test right now only GetItem method without SubmitScan and vs. to see if both have the same problem or not.

Thanks a lot in advance.
If it's not broken, fix it until it is.


My Blog
Répondre
Fil
Voir

Click here to load this message in the networking platform