Well, first of all you should read this question: Learning garbage collection theory
Then, you need to know that every javascript runtime implement its own very specific GC, so there is absolutely no rule to when and how the objects are garbage collected. Once they are not referenced you should consider them gone forever, and trust (I know, it's a lot to ask) that GC will release the memory at the "best time" after the object are dereferenced.
To know more about specific stuff about each GC, you need to go read resources concerning each one of them, luckily for you, there is now only 3 major engines! Here are resources to help you get further on the topic of GC in JS:
- SpiderMonkey:
- https://archive.fosdem.org/2013/schedule/event/spidermonkey_garbage_collection_where_we_are_now_and_where_we_are_going/
- http://people.mozilla.org/~jcoppeard/fosdem_gc_talk/
- https://air.mozilla.org/spider-monkey-garbage-collection/
- https://blog.mozilla.org/javascript/2013/07/18/clawing-our-way-back-to-precision/
- Node.JS:
- garbage collection with node.js
- Garbage collector in Node.js
- http://blog.nodejs.org/2013/03/11/node-v0-10-0-stable/ (paragraph Latency and Idle Garbage Collection)
- https://github.com/bnoordhuis/node-idle-gc
- https://npmjs.org/package/memwatch
- Chakra
I'm pretty sure I'm not exhaustive with all those links, but I guess it's a good starting point for you to learn more about all the specifics on the GC of the three JS engines!