I have learned from this thread that node. JS Generation uses GC.
I would like to know the cyclical object references (both of which I remove / ensure that eventually get out of the area) and know what the node. For example, if the referee was used by the JS,
-
For every HTTP request, this is a problem, So I would like to know how good node is on this.
Some usage scenarios:
-
I am creating a timeout with a lambda, which is potentially reference to scope objects in the scope object of the timeout object There is also reference, etc ...
-
For every user session, I have a
pointer (still happening programming) The http request is a reference to objects in which there are references to session objects, etc. ... request ob Ject are often removed, but no session object.Edit: I ask because of this link I found online
As you've mentioned, nodjs use a generation gc ... especially and therefore, this reference does not do GC type. Instead, it does a perfect mark and sweep type GC.
So as long as you get rid of all the contexts of objects (even if they get each other up to the cyclic-wet point), they should get garbage collected at some point.
It does not mean that you should not care about GC. If you have a very active nodeage server, then the garbage collector will really work hard to clean your garbage, especially if you have many "medium lifespan" objects (i.e., does not last for long or longer) .
-
Comments
Post a Comment