From: Aaron Patterson Date: 2007-01-12T15:59:19+09:00 Subject: Garbage collection and Arrays Hi, I seem to be running in to some garbage collection weirdness. Hopefully someone will have some insight for me.... My sample script seems to leak Strings when I use shift on an Array, but not pop: array = [] 10.times { array << "foo" } 10.times { array.pop } # Change this to shift to see a leak o_count = Hash.new(0) GC.start ObjectSpace.each_object { |o| o_count[o.class] += 1 } o_count.sort_by { |k,v| -v}.each { |k,v| puts "#{k}: #{v}" } Is this a bug? Or is there something I'm missing? Thanks! --Aaron -- Aaron Patterson http://tenderlovemaking.com/