Recycling strategies: reference counting and mark-and-sweep methods
The disadvantages of mark-and-sweep method are
JS is single-threaded and will stop completely when encountering the garbage collection mechanism. Therefore, the browser has been optimized to achieve multi-threaded parallel recycling, but it still blocks the execution of JS. Therefore, incremental marking, segmented garbage collection, and cross execution were born.