Hi everyone, I recently had a problem with memory usage in my ruby 1.8.6 
program. It had ballooned from about 65mb after startup to 300mb. I 
tracked the problem down to my usage of WeakRefs. Storing object_ids 
instead got the memory usage back to where it was.

In the following example I'm checking memory usage with Windows Task 
Manager.


 > irb

irb(main):001:0> require 'weakref'
=> true
irb(main):002:0> s = 'hello'
=> "hello"
irb(main):003:0> a = []
=> []

(memory usage is 4,171k at this point)

irb(main):004:0> 100.times { a << WeakRef.new(s) }
=> 100

(memory usage is now 54,380k)


Repeated calls to GC.start doesn't reduce the memory usage at this 
point. Am I missing something?

David