Looks for me that you are using global variables when you should use local so that the memory would only be recerved until need for values disapears.
pyTony
pyMod
5,359 posts since Apr 2010
Reputation Points: 782
Solved Threads: 852
SetLength does the appropriate memory management for you, if you are not using objects in it.
Why not use a TList instead of constantly resizing an array.
pritaeas
Posting Expert
5,480 posts since Jul 2006
Reputation Points: 653
Solved Threads: 874