Issue #4168 has been updated by Charles Nutter.


Given proper WeakReference and ReferenceQueue implementations (the latter we still don't for C, I believe), implementing weak-keyed or weak-valued hashes becomes trivial. See my "weakling" gem for an example that uses Java WeaReference/ReferenceQueue.

Without ReferenceQueue, WeakReference is much less useful. You are forced to constantly scan lists/maps/etc for dead links.
----------------------------------------
http://redmine.ruby-lang.org/issues/show/4168

----------------------------------------
http://redmine.ruby-lang.org