On 10/4/06, Chris McMahon <[EMAIL PROTECTED]> wrote:
However, it seems that when I clear the array with "ginormous_array = []", Ruby doesn't give back the memory it took loading it up in the first place. 

Anyone have a suggestion of how to force Ruby to give back the memory for an array that no longer contains any data?  


You need to run the garbage collector. It is something like this:

  GC.start

You also need to make sure that you don't retain any references to any bits of the array. Assign them to nil, or better, ensure they are out of scope.

Bret
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to