This repository was archived by the owner on Mar 8, 2020. It is now read-only.

Description
After a glimpse to the methods in Node (C++ side), I have the (untested of course) hypothesis that ValueAt may be leaking memory.
ValueAt creates new global ref for and object obj and calls lookupOrCreate(obj)
lookupOrCreate tries to find a Node for obj (if it previously existed, we created a new reference to it, and we are only deallocating one). If no Node existed, calls the constructor of Node, which creates a new reference to obj, but we do not release the original one at any point D:
Proposed solution is end ValueAt method with:
return lookupOrCreate(val);
instead of
return lookupOrCreate(env->NewGlobalRef(val));