No, not a lot of examples. Here's a patch that's somewhat naive but passes all tests on my machine (Linux PPC).
I'm a bit concerned about the initialization code, especially the static hash, but it's more important to have code available for review than improvement than to wait until it's perfect to release it.
Your concerns are valid. The hash gets happily collected by the garbage collector. All nci tests fail here with --gc-debug.
leo