I have a script that takes every node of every curve in a document and finds the nodes from other curves that are on top or beneath it, then moves them to the nearest grid point (the grid is predefined) (the purpose is still unclear to me, bot those were the specs of the project, so...). The script works, but...
To be sure I don't run out of memory on 100000+ nodes in a file, I initialize an array with all the nodes, on the prezumtion that after I do that, CorelDraw wouldn't have any reasons to eat up more memory (so that if it crashes, let it crash after 1 minute, not after 1 hour).
The problem is that CorelDraw is slowly eating up memory after that (about 150 megs/hour

). I even tried to make all variables global (I've read somewhere that VB frees the memory alocated for a subroutine only after the whole script ends) but to no result.
Is this a known bug? Or can I do something to free the memory while the script is running?