SELECT TheCursorWithTheDataInIt SCAN oXLPage = CREATEOBJECT("DoOnePageThingy", param1, param2 ...) ENDSCANOnly 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.
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 ...) ENDPROCHowever, no improvement. Any clues that may relate to var scope, Autoyield, DOEVENTS etc?