Answer the question
In order to leave comments, you need to log in
Do variables need to be nulled after use?
Can you please tell me whether it is necessary to reset const and let after use, for example, in a long-lived loop, to free memory after each iteration?
Answer the question
In order to leave comments, you need to log in
in general, no. in general - give an example to start with. how many megabytes you are going to release by zeroing, for how long they "freeze" with you, what environment, what requirements, and a lot of everything else should be added up in order to basically make sense to think about this issue.
If you do not have memory leaks, then the garbage collector will collect everything unnecessary, and you still cannot "zero" everything you need.
https://habr.com/ru/company/badoo/blog/454930/
here is not a bad article on modern GC in v8
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question