2 ms·
This is all stuff you really shouldn't do. Use the profiling tools to figure out where your memory leaks exist. Doing it in code has a lot of negative consequ
by cogman10 6y ago
This is all stuff you really shouldn't do.
Use the profiling tools to figure out where your memory leaks exist. Doing it in code has a lot of negative consequences. Weak maps and sets, for example, will slow down your GC.
The typical usage of Weak maps and sets is for caching. This allows the GC to give itself extra room on the heap at the expense of potentially another round trip or new calculation.