>> snip <
> I could guess that the creation and destruction of the objects is causing memory to become fragmented over time. Creating them once and leaving them there until you are really done with them would be a more solid approach (at least as far as internal memory management goes).
>
>Let me ask Edward Johnson's question again. Is there a low level API that compacts the heap and would that fix this problem of memory fragmentation.
Dan,
I have no idea. I'nm sure there is something in the VC++ language that will do that but I haven't got a clue if and how VFP makes use of that. I wouldn't suggest muckig around with the memory heap of a runing application from outside ot that application anyway even if I knew which API function would do it. Especially with the fancy pancy stuff that VFP does with memory.