I can assure you that the index out of range, based on the code I saw, was/is not being caused by lack of memory.
EDIT: You know that when you are debugging this you can look at the list Count
property and the value of the index where the error is thrown. You will see the index is >= to Count, or is less than 0, all of which indicate an improper index out of range.