Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Memory leak
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Memory leak
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01095329
Message ID:
01095329
Vues:
65
Folks

I'm running an app that creates pages of HTML using Office automation (graphic objects created on an Excel worksheet and saved in web format). This iterates to create an entire website and takes about 2 hours to run, in the form:
SELECT TheCursorWithTheDataInIt
SCAN
  oXLPage = CREATEOBJECT("DoOnePageThingy", param1, param2 ...)
ENDSCAN
Only trouble is, there's a memory leak somewhere. I start with a memory usage of about 350Mb on my 1Gb system and by about 1/3 of the way through memory usage has risen to >1.5Gb and my system grinds to a halt. When I close Excel manually, memory usage drops just for the Excel instance. When I close VFP9, I recover >1Gb of memory, so I'm pointing at the VFP part of my app.

I assume the object oXLPage above should be garbage collected on each iteration, but to be more explicit I have tried this form:
SELECT TheCursorWithTheDataInIt
SCAN
  = Do1Page(param1, param2 ...)
ENDSCAN

PROC Do1Page
LPARAMETERS param1, param2 ...
* the var goes out of scope more explicitly here
LOCAL oXLPage
oXLPage = CREATEOBJECT("DoOnePageThingy", param1, param2 ...)
ENDPROC
However, no improvement. Any clues that may relate to var scope, Autoyield, DOEVENTS etc?

John Burton
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform