mongodb/mongo-ruby-driver — pull request #147 by cheald (2013-01-11 11:35:57+00:00)
Title: Additional reference cleanup

A few references are still being leaked, which prevent the Ruby GC from doing its thing and cleaning up old resources. Specifically:

* Nodes hold onto a `@pool` reference
* Thread locals maintain a hash map that holds socket references

These patches resolve those issues. I'm currently running this version of the driver in our production environment and verifying its behavior via process introspection, and it seems to be working like a champ. Class usage and socket usage are both static and steady, so I believe that this should resolve any remaining memory or socket leak issues.

Passes on 1.8.7/1.9.3/JRuby 1.7.1 locally.