Open Dhruv-Garg79 opened 1 year ago
@Dhruv-Garg79 that is correct. But this way I just make the work of the garbage collector a little bit easier 🙂 An this way also other programmers can see - this is the end.
But how does that make the work of GC easier? you have just derefernced it, GC will work the same if you derefernced it yourself, or node.js does it. GC reclaims the memory for objects that are not reachable(dereferenced), it does not dereference them itself, right?
The other point regarding - this is the end. seems nice.
@Dhruv-Garg79 my logic is - GC need a little bit more time to understand when the object is not reachable. This way you tell it directly.
Don't think about this too much, it probably have no difference
yeah, got it. Just wanted to understand If I am missing something.
Hey first of all thanks for this project, I was exploring uWebSockets.js.
I was going through your code and saw that you have explicitly dereferenced
ctx = null
insetupRouteHandlers.js
file.According to my understanding, it will get dereferenced on it's own when the function block ends. please correct me If I am wrong.