[ruby-core:32819] Re: WeakHash

From: Urabe Shyouhei <shyouhei@...>
Date: 2010-10-16 02:09:15 UTC
List: ruby-core #32819
(2010/10/16 8:26), Asher wrote:
> The conservative nature of the GC makes this nigh impossible. 

Not always.  When you can write a C extension it's possible.
http://coderepos.org/share/browser/lang/ruby/misc/shystd/ext/weakref/weakhash.c

> See https://rubygems.org/gems/weakhash for details. It would be nice.

Nice indeed.  Very simple to understand.

In This Thread