I wrote a Python program that acts on a large input file to create a few million objects representing triangles. The algorithm is:
Python is garbage-collected, so if you reduce the size of your list, it will reclaim memory. You can also use the "del" statement to get rid of a variable completely:
biglist = [blah,blah,blah] #... del biglist