Status: New
Owner: ----

New issue 2073 by [email protected]: Garbage collector sometimes fails on objects with Object.defineProperty (memleak?)
http://code.google.com/p/v8/issues/detail?id=2073

When I use `Object.defineProperty` in an Object's constructor, the object is _sometimes_ never garbage collected.

https://gist.github.com/2364840

This script creates 1,000 objects that emit `close` after 2 seconds. Using `node-weak` I track how many of them are garbage collected (you can comment out the `gc()` call and wait if you don't want to `--expose_gc`).

When all objects have emitted `close` there are still some of them in the memory, not collected by the GC (the count varies between 8 and 15, so it's not predictable).

This works perfectly on Node 0.4, but fails on 0.6 and 0.7 (I think 0.6 has the new GC code / V8 >= 3.6, so it may have something to do with it)

see GitHub for the node issue:
https://github.com/joyent/node/issues/3092

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to