chad3814 / node-hashtable

Native hashtable interface for when V8 objects can't take the heat
MIT License
106 stars 41 forks source link

Fix: Objects not loaded after repeated put #11 #12

Closed liyu1981 closed 10 years ago

liyu1981 commented 10 years ago

Similar bugs founded in my project. (ref issue #11)

It seems that Local:New(args[0]) will be freed by v8 in a very bad way (which is, the underlying storage is freed, while the ptr is still in hold).

So I just looked at the commit history and fixed it by using the copy-to-local first strategy. Currently this seems work in my place, and should work other place. It is safer, slower, but it make 0.4.* branch work.