I read that node.js is single-threaded, so it does not develop a new process or start a new thread for every HTTP request. But does the http module have a way to clear after closing each connection? For example, if I create an object inside a callback every time someone asks for a page, does this object destroy after the answer is answered and the connection is closed?
Yes, this is true because of the review.
http.createServer(function(res) { var localobject = new BigObject(); ... res.end(); });
Upon completion of the function, BigObject is no longer used and is cleared by the garbage collector.
Source: https://habr.com/ru/post/893826/More articles:What is the recommended solution structure for several large websites in asp.net - asp.netread one line with "read" in bash, but without "while" - bashI can not compile hamcrest hasKey () method - javajQuery: Changing CSS on an element loaded with ajax? - jqueryOverride jquery date - jqueryLinux: Command Line Utility Convert RTF to PDF? - pdfHow to Change Emacs Command Line Color - colorsHow to submit code to github? - githubCSS: hide column when decreasing width - cssHow to include images in a library in iOS / Xcode 4 - resourcesAll Articles