Hello. I have a small C# program which uses a number of large arrays of
double. The program runs fine on my desktop PC which has 2 GB of memory, but
when run on my laptop with 512 MB the laptop practically freezes up, from
running out of memory. I would therefore like to modify my program so that
memory space used by the various arrays can be freed up once I am done with
each array. I have tried many things before calling GC.Collect(), including
setting the array ref to null, setting the array ref to a new, very small
array, putting the array in its own class and instantiating one of these and
expecting it to go out of scope, making a component with the array and
disposing of the component after use. When I watch the memory usage in Task
Manager, it doesn't drop back to the original level until I quit my program
altogether, for any of these attempts.
My question is - how can I force this memory to be freed up? Thanks in
advance.
John Mann