(code with "puts Time.now" at beginning and end was pasted in) >> puts Time.now Sun Feb 15 15:44:38 -0500 2009 => nil >> count = ObjectSpace.each_object { } => 7930 >> 100_000.times do |i| ?> String.new >> c = ObjectSpace.each_object { } >> if c < count >> puts "GC - Iteration #{i} - Was #{count} now #{c}" >> end >> count = c >> end GC - Iteration 14738 - Was 24489 now 5272 GC - Iteration 31811 - Was 22348 now 5273 GC - Iteration 48884 - Was 22349 now 5274 GC - Iteration 65956 - Was 22349 now 5273 GC - Iteration 83029 - Was 22349 now 5273 => 100000 >> puts Time.now Sun Feb 15 15:46:52 -0500 2009 => nil (note that this took about 2.5 minutes!)