Ferret causing "out of memory"

I am a bit puzzled. I am having issues with memory leaking away. It
seems to be related to searching documents by ‘id’ column value.

This is what I am doing:

cached_annotations = Ferret::Index::Index.new(:path =>
“#{RAILS_ROOT}/db/ferret/tmp/annotations”, :auto_flush => false)

100000.times { |x| doc=cached_annotations[x.to_s] }

Every 100000.times eats 100MB of memory.

I am on ferret 0.9.3 with C extentions. Ubuntu Linux is the OS.

Thanks Sergei, Well spotted. This will be fixed in the next version.

Cheers,
Dave