From: dan yoder Date: 2008-01-10T01:25:02+09:00 Subject: Re: why does this code leak? > so.... why does installing a static finalizer work ok, but a dynamic   > one leaks memory!? My guess is that the lambda is keeping the scope of the new invocation around, which includes a reference to the newly created array. Would it be a better test not to use Array (instances of which seems to be created also by ObjectSpace / YAML)? Ex: class Foo ; end 7.times { GC.start count = ObjectSpace.each_object(Foo) p "Count: #{count}" Foo.new } -Dan