GC算法 馒头752 2023-05-14 52 阅读1分钟 经典的GC算法有三种:引用计数(reference counting)、标记-清扫(mark & sweep)、复制收集(Copy and Collection)。 Golang的GC算法主要是基于标记-清扫(mark and sweep)算法,并在此基础上做了改进。因此,在此主要介绍一下标记-清扫(mark and sweep)算法,关于引用计数(reference counting)和复制收集(copy and collection)